UAPI: Rename all '__unused' struct fields to '__unused1'
PATCH 1/1 UAPI: Rename all '__unused' struct fields to '__unused1'
'__unused' is defined as a macro by some BSD-derived userland software. We should avoid using it in the UAPI.
References: https://bugs.debian.org/522773
Reported-by Thorsten Glaser <[email protected]>
Signed-off-by Ben Hutchings <ben-/[email protected]>
---
Build-tested on x86 only. I also grepped for uses of the supposedly
__unused fields on other architectures and found nothing.
Ben.
arch/alpha/include/uapi/asm/stat.h | 2 +- arch/arm64/include/uapi/asm/ucontext.h | 2 +- arch/ia64/include/uapi/asm/stat.h | 2 +- arch/powerpc/include/uapi/asm/ucontext.h | 2 +- arch/s390/include/uapi/asm/stat.h | 2 +- arch/s390/include/uapi/asm/ucontext.h | 4 ++-- arch/sparc/include/uapi/asm/fcntl.h | 4 ++-- arch/sparc/include/uapi/asm/stat.h | 2 +- arch/x86/include/uapi/asm/stat.h | 8 ++++---- include/uapi/linux/icmp.h | 2 +- include/uapi/linux/sysctl.h | 2 +- 11 files changed, 16 insertions(+), 16 deletions(-)
arch/alpha/include/uapi/asm/stat.h +1 -1
@@ -42,7 +42,7 @@ struct stat64 {unsigned long st_mtime_nsec;unsigned long st_ctime;unsigned long st_ctime_nsec; - long __unused[3]; + long __unused1[3]; };#endif
arch/arm64/include/uapi/asm/ucontext.h +1 -1
@@ -24,7 +24,7 @@ struct ucontext {stack_t uc_stack;sigset_t uc_sigmask;/* glibc uses a 1024-bit sigset_t */ -__u8 __unused[1024 /8 -sizeof (sigset_t)]; +__u8 __unused1[1024 /8 -sizeof (sigset_t)];/* last for future expansion */ struct sigcontext uc_mcontext; };
arch/ia64/include/uapi/asm/stat.h +1 -1
@@ -24,7 +24,7 @@ struct stat {unsigned long st_ctime_nsec;unsigned long st_blksize;long st_blocks; -unsigned long __unused[3 ]; +unsigned long __unused1[3 ]; };#define STAT_HAVE_NSEC 1
arch/powerpc/include/uapi/asm/ucontext.h +1 -1
@@ -28,7 +28,7 @@ struct ucontext {sigset_t uc_sigmask;/* glibc has 1024-bit signal masks, ours are 64-bit */ #ifdef __powerpc64__ -sigset_t __unused[15 ];/* Allow for uc_sigmask growth */ +sigset_t __unused1[15 ];/* Allow for uc_sigmask growth */ struct sigcontext uc_mcontext;/* last for extensibility */ #else int uc_maskext[30 ];
arch/s390/include/uapi/asm/stat.h +1 -1
@@ -93,7 +93,7 @@ struct stat {unsigned long st_ctime_nsec;unsigned long st_blksize;long st_blocks; - unsigned long __unused[3]; + unsigned long __unused1[3]; };#endif /* __s390x__ */
arch/s390/include/uapi/asm/ucontext.h +2 -2
@@ -23,7 +23,7 @@ struct ucontext_extended {_sigregs uc_mcontext;sigset_t uc_sigmask;/* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */ -unsigned char __unused[128 -sizeof (sigset_t)]; +unsigned char __unused1[128 -sizeof (sigset_t)];_sigregs_ext uc_mcontext_ext; };
@@ -34,7 +34,7 @@ struct ucontext {_sigregs uc_mcontext;sigset_t uc_sigmask;/* Allow for uc_sigmask growth. Glibc uses a 1024-bit sigset_t. */ - unsigned char __unused[128 - sizeof(sigset_t)]; + unsigned char __unused1[128 - sizeof(sigset_t)]; };#endif /* !_ASM_S390_UCONTEXT_H */
arch/sparc/include/uapi/asm/fcntl.h +2 -2
@@ -48,8 +48,8 @@#define F_WRLCK 2#define F_UNLCK 3 -#define __ARCH_FLOCK_PAD short __unused; -#define __ARCH_FLOCK64_PAD short __unused; +#define __ARCH_FLOCK_PAD short __unused1; +#define __ARCH_FLOCK64_PAD short __unused1;#include <asm-generic/fcntl.h>
arch/sparc/include/uapi/asm/stat.h +1 -1
@@ -43,7 +43,7 @@ struct stat64 {unsigned long st_mtime_nsec;unsigned long st_ctime;unsigned long st_ctime_nsec; - long __unused[3]; + long __unused1[3]; };#else
arch/x86/include/uapi/asm/stat.h +4 -4
@@ -99,15 +99,15 @@ struct stat {__kernel_ulong_t st_mtime_nsec;__kernel_ulong_t st_ctime;__kernel_ulong_t st_ctime_nsec; - __kernel_long_t __unused[3]; + __kernel_long_t __unused1[3]; };/* We don't need to memset the whole thing just to initialize the padding */ #define INIT_STRUCT_STAT_PADDING (st) do { \ st.__pad0 = 0; \ - st.__unused[0] = 0; \ - st.__unused[1] = 0; \ - st.__unused[2] = 0; \ + st.__unused1[0] = 0; \ + st.__unused1[1] = 0; \ + st.__unused1[2] = 0; \ } while (0)#endif
include/uapi/linux/icmp.h +1 -1
@@ -76,7 +76,7 @@ struct icmphdr { } echo;__be32 gateway;struct { -__be16 __unused; +__be16 __unused1;__be16 mtu; } frag; } un;
include/uapi/linux/sysctl.h +1 -1
@@ -40,7 +40,7 @@ struct __sysctl_args {size_t __user *oldlenp;void __user *newval;size_t newlen; -unsigned long __unused[4 ]; +unsigned long __unused1[4 ]; };/* Define sysctl names first */