diff --git a/include/dirent.h b/include/dirent.h index 7b4a0787..9e37f951 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -48,7 +48,7 @@ struct dirent ino_t d_ino; off_t d_off; unsigned short int d_reclen; -#if 0 +#if __SIZEOF_LONG_LONG__ == 8 unsigned char d_type; #endif char d_name[256]; /* We must not include limits.h! */ diff --git a/include/linux/arm/kernel-stat.h b/include/linux/arm/kernel-stat.h index 5223ba2f..a32eb981 100644 --- a/include/linux/arm/kernel-stat.h +++ b/include/linux/arm/kernel-stat.h @@ -76,11 +76,19 @@ struct stat #undef SYS_stat #define SYS_stat SYS_stat64 + #undef SYS_lstat #define SYS_lstat SYS_lstat64 + #undef SYS_fstat #define SYS_fstat SYS_fstat64 +#undef SYS_fctnl +#define SYS_fctnl SYS_fcntl64 + +#undef SYS_getdents +#define SYS_getdents SYS_getdents64 + #endif // __SIZEOF_LONG_LONG__ == 8 #endif // __MES_LINUX_ARM_KERNEL_STAT_H diff --git a/include/linux/arm/syscall.h b/include/linux/arm/syscall.h index 3251c29a..5883dc13 100644 --- a/include/linux/arm/syscall.h +++ b/include/linux/arm/syscall.h @@ -70,6 +70,7 @@ #define SYS_rt_sigaction 0xae #define SYS_rt_sigreturn 0xad #define SYS_fcntl 0x37 +#define SYS_fcntl64 0xdd #define SYS_getrusage 0x4d #define SYS_lstat 0x6b #define SYS_lstat64 0xc4 @@ -78,6 +79,7 @@ #define SYS_fstat64 0xc5 #define SYS_nanosleep 0xa2 #define SYS_getdents 0x8d +#define SYS_getdents64 0xdc /* bash */ #define SYS_setuid 0x17 diff --git a/include/linux/x86/kernel-stat.h b/include/linux/x86/kernel-stat.h index ab4a3faa..f93face1 100644 --- a/include/linux/x86/kernel-stat.h +++ b/include/linux/x86/kernel-stat.h @@ -76,11 +76,19 @@ struct stat #undef SYS_stat #define SYS_stat SYS_stat64 + #undef SYS_lstat #define SYS_lstat SYS_lstat64 + #undef SYS_fstat #define SYS_fstat SYS_fstat64 +#undef SYS_fctnl +#define SYS_fctnl SYS_fcntl64 + +#undef SYS_getdents +#define SYS_getdents SYS_getdents64 + #endif // __SIZEOF_LONG_LONG__ == 8 #endif // __MES_LINUX_X86_KERNEL_STAT_H diff --git a/include/linux/x86/syscall.h b/include/linux/x86/syscall.h index 8db1d6ba..a44d7a60 100644 --- a/include/linux/x86/syscall.h +++ b/include/linux/x86/syscall.h @@ -70,6 +70,7 @@ #define SYS_rt_sigaction 0xae #define SYS_signal 0x30 #define SYS_fcntl 0x37 +#define SYS_fcntl64 0xdd #define SYS_getrusage 0x4d #define SYS_lstat 0x6b #define SYS_lstat64 0xc4 @@ -78,6 +79,7 @@ #define SYS_fstat64 0xc5 #define SYS_nanosleep 0xa2 #define SYS_getdents 0x8d +#define SYS_getdents64 0xdc /* bash */ #define SYS_setuid 0x17 diff --git a/include/sys/types.h b/include/sys/types.h index 14fccf81..d8ab86e4 100644 --- a/include/sys/types.h +++ b/include/sys/types.h @@ -106,7 +106,7 @@ typedef unsigned long uintptr_t; #ifndef __MES_OFF_T #define __MES_OFF_T #undef off_t -#if __M2__ +#if __M2__ || __SIZEOF_LONG_LONG__ != 8 typedef long off_t; #else typedef long long off_t;