doesn't have _FILE_OFFSET_BITS=64, like klibc. We only touch the
first 512 bytes regardless, so it's completely harmless even if we
only get 32 bits.
* mtools, but requires root privilege.
*/
-#define _XOPEN_SOURCE 500 /* Required on glibc 2.x */
-#define _BSD_SOURCE
+#define _XOPEN_SOURCE 500 /* For pread() pwrite() */
+#define _BSD_SOURCE /* For seteuid() */
+#define _LARGEFILE64_SOURCE /* For O_LARGEFILE */
#include <alloca.h>
#include <errno.h>
#include <fcntl.h>
* First make sure we can open the device at all, and that we have
* read/write permission.
*/
- dev_fd = open(device, O_RDWR);
+ dev_fd = open(device, O_RDWR|O_LARGEFILE);
if ( dev_fd < 0 || fstat(dev_fd, &st) < 0 ) {
perror(device);
exit(1);