Skip to content

Commit b7d624a

Browse files
guoren83arndb
authored andcommitted
asm-generic: unistd.h: fixup broken macro include.
The broken macros make the glibc compile error. If there is no __NR3264_fstat*, we should also removed related definitions. Reported-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org> Fixes: bf4b6a7 ("y2038: Remove stat64 family from default syscall set") [arnd: Both Marcin and Guo provided this patch to fix up my clearly broken commit, I applied the version with the better changelog.] Signed-off-by: Guo Ren <ren_guo@c-sky.com> Signed-off-by: Mao Han <han_mao@c-sky.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Arnd Bergmann <arnd@arndb.de>
1 parent 2e6e902 commit b7d624a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

include/uapi/asm-generic/unistd.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,10 @@ __SYSCALL(__NR_rseq, sys_rseq)
760760
#define __NR_ftruncate __NR3264_ftruncate
761761
#define __NR_lseek __NR3264_lseek
762762
#define __NR_sendfile __NR3264_sendfile
763+
#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
763764
#define __NR_newfstatat __NR3264_fstatat
764765
#define __NR_fstat __NR3264_fstat
766+
#endif
765767
#define __NR_mmap __NR3264_mmap
766768
#define __NR_fadvise64 __NR3264_fadvise64
767769
#ifdef __NR3264_stat
@@ -776,8 +778,10 @@ __SYSCALL(__NR_rseq, sys_rseq)
776778
#define __NR_ftruncate64 __NR3264_ftruncate
777779
#define __NR_llseek __NR3264_lseek
778780
#define __NR_sendfile64 __NR3264_sendfile
781+
#if defined(__ARCH_WANT_NEW_STAT) || defined(__ARCH_WANT_STAT64)
779782
#define __NR_fstatat64 __NR3264_fstatat
780783
#define __NR_fstat64 __NR3264_fstat
784+
#endif
781785
#define __NR_mmap2 __NR3264_mmap
782786
#define __NR_fadvise64_64 __NR3264_fadvise64
783787
#ifdef __NR3264_stat

0 commit comments

Comments
 (0)