_LARGEFILE_SOURCE
parent
b0009b6440
commit
050112183b
|
@ -73,6 +73,9 @@
|
||||||
* - reallocation on a bigalloc filesystem
|
* - reallocation on a bigalloc filesystem
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#define _LARGEFILE_SOURCE
|
||||||
|
#define _LARGEFILE64_SOURCE
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -705,7 +708,7 @@ int main(int narg, char **args)
|
||||||
realloc_data rd = { 0 };
|
realloc_data rd = { 0 };
|
||||||
int optind, retval, io_flags = 0, force = 0;
|
int optind, retval, io_flags = 0, force = 0;
|
||||||
io_manager io_ptr = unix_io_manager;
|
io_manager io_ptr = unix_io_manager;
|
||||||
struct stat st_buf;
|
struct stat64 st_buf;
|
||||||
for (optind = 1; optind < narg; optind++)
|
for (optind = 1; optind < narg; optind++)
|
||||||
{
|
{
|
||||||
if (!strcmp(args[optind], "--patch"))
|
if (!strcmp(args[optind], "--patch"))
|
||||||
|
@ -742,7 +745,8 @@ int main(int narg, char **args)
|
||||||
com_err(program_name, errno, _("while opening %s"), rd.device_name);
|
com_err(program_name, errno, _("while opening %s"), rd.device_name);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
retval = fstat(rd.fs_fd, &st_buf);
|
// FIXME Don't know why, but it segfaults if I use ext2fs_fstat here! (of course with ext2fs_struct_stat)
|
||||||
|
retval = fstat64(rd.fs_fd, &st_buf);
|
||||||
if (retval < 0)
|
if (retval < 0)
|
||||||
{
|
{
|
||||||
com_err(program_name, errno, _("while getting stat information for %s"), rd.device_name);
|
com_err(program_name, errno, _("while getting stat information for %s"), rd.device_name);
|
||||||
|
|
Loading…
Reference in New Issue