diff --git a/lnet/utils/debug.c b/lnet/utils/debug.c index 14750d88997ea8dcb4267b2a6c259851039de518..2ca4dc3869bcc734dddc13f2bfac3dd344df3efb 100644 --- a/lnet/utils/debug.c +++ b/lnet/utils/debug.c @@ -23,6 +23,8 @@ * */ +#define __USE_FILE_OFFSET64 + #include <stdio.h> #include <netdb.h> #include <stdlib.h> @@ -416,16 +418,7 @@ int jt_dbg_debug_file(int argc, char **argv) return -1; } -#ifndef __CYGWIN__ -# ifndef SYS_fstat64 -# define __SYS_fstat__ SYS_fstat -# else -# define __SYS_fstat__ SYS_fstat64 -# endif - rc = syscall(__SYS_fstat__, fd, &statbuf); -#else rc = fstat(fd, &statbuf); -#endif if (rc < 0) { fprintf(stderr, "fstat failed: %s\n", strerror(errno)); goto out; diff --git a/lnet/utils/l_ioctl.c b/lnet/utils/l_ioctl.c index 58a408a8f1309cf90474a7839bc8bf175501dd73..1adcc8eb88d2aee269fdbf4eb71640bf3517bbf1 100644 --- a/lnet/utils/l_ioctl.c +++ b/lnet/utils/l_ioctl.c @@ -20,6 +20,8 @@ * */ +#define __USE_FILE_OFFSET64 + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -244,12 +246,7 @@ parse_dump(char * dump_file, int (*ioc_func)(int dev_id, int opc, void *)) exit(1); } -#ifndef SYS_fstat64 -# define __SYS_fstat__ SYS_fstat -#else -# define __SYS_fstat__ SYS_fstat64 -#endif - if (syscall(__SYS_fstat__, fd, &st)) { + if (fstat(fd, &st)) { perror("stat fails"); exit(1); } diff --git a/lustre/portals/utils/debug.c b/lustre/portals/utils/debug.c index 14750d88997ea8dcb4267b2a6c259851039de518..2ca4dc3869bcc734dddc13f2bfac3dd344df3efb 100644 --- a/lustre/portals/utils/debug.c +++ b/lustre/portals/utils/debug.c @@ -23,6 +23,8 @@ * */ +#define __USE_FILE_OFFSET64 + #include <stdio.h> #include <netdb.h> #include <stdlib.h> @@ -416,16 +418,7 @@ int jt_dbg_debug_file(int argc, char **argv) return -1; } -#ifndef __CYGWIN__ -# ifndef SYS_fstat64 -# define __SYS_fstat__ SYS_fstat -# else -# define __SYS_fstat__ SYS_fstat64 -# endif - rc = syscall(__SYS_fstat__, fd, &statbuf); -#else rc = fstat(fd, &statbuf); -#endif if (rc < 0) { fprintf(stderr, "fstat failed: %s\n", strerror(errno)); goto out; diff --git a/lustre/portals/utils/l_ioctl.c b/lustre/portals/utils/l_ioctl.c index 58a408a8f1309cf90474a7839bc8bf175501dd73..1adcc8eb88d2aee269fdbf4eb71640bf3517bbf1 100644 --- a/lustre/portals/utils/l_ioctl.c +++ b/lustre/portals/utils/l_ioctl.c @@ -20,6 +20,8 @@ * */ +#define __USE_FILE_OFFSET64 + #include <stdio.h> #include <stdlib.h> #include <string.h> @@ -244,12 +246,7 @@ parse_dump(char * dump_file, int (*ioc_func)(int dev_id, int opc, void *)) exit(1); } -#ifndef SYS_fstat64 -# define __SYS_fstat__ SYS_fstat -#else -# define __SYS_fstat__ SYS_fstat64 -#endif - if (syscall(__SYS_fstat__, fd, &st)) { + if (fstat(fd, &st)) { perror("stat fails"); exit(1); }