summaryrefslogtreecommitdiffstats
path: root/arch/alpha
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2019-03-11 16:38:17 +0100
committerDavid S. Miller <davem@davemloft.net>2019-03-11 11:06:00 -0700
commita623a7a1a5670c25a16881f5078072d272d96b71 (patch)
treec516eeee0df2feb17f4e34fb29df16b6f55cedd6 /arch/alpha
parenta843dc4ebaecd15fca1f4d35a97210f72ea1473b (diff)
downloadlinux-a623a7a1a5670c25a16881f5078072d272d96b71.tar.gz
linux-a623a7a1a5670c25a16881f5078072d272d96b71.tar.bz2
linux-a623a7a1a5670c25a16881f5078072d272d96b71.zip
y2038: fix socket.h header inclusion
Referencing the __kernel_long_t type caused some user space applications to stop compiling when they had not already included linux/posix_types.h, e.g. s/multicast.c -o ext/sockets/multicast.lo In file included from /builddir/build/BUILD/php-7.3.3/main/php.h:468, from /builddir/build/BUILD/php-7.3.3/ext/sockets/sockets.c:27: /builddir/build/BUILD/php-7.3.3/ext/sockets/sockets.c: In function 'zm_startup_sockets': /builddir/build/BUILD/php-7.3.3/ext/sockets/sockets.c:776:40: error: '__kernel_long_t' undeclared (first use in this function) 776 | REGISTER_LONG_CONSTANT("SO_SNDTIMEO", SO_SNDTIMEO, CONST_CS | CONST_PERSISTENT); It is safe to include that header here, since it only contains kernel internal types that do not conflict with other user space types. It's still possible that some related build failures remain, but those are likely to be for code that is not already y2038 safe. Reported-by: Laura Abbott <labbott@redhat.com> Fixes: a9beb86ae6e5 ("sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/alpha')
-rw-r--r--arch/alpha/include/uapi/asm/socket.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/alpha/include/uapi/asm/socket.h b/arch/alpha/include/uapi/asm/socket.h
index 0d0fddb7e738..976e89b116e5 100644
--- a/arch/alpha/include/uapi/asm/socket.h
+++ b/arch/alpha/include/uapi/asm/socket.h
@@ -2,8 +2,8 @@
#ifndef _UAPI_ASM_SOCKET_H
#define _UAPI_ASM_SOCKET_H
+#include <linux/posix_types.h>
#include <asm/sockios.h>
-#include <asm/bitsperlong.h>
/* For setsockopt(2) */
/*