From patchwork Mon Mar 11 15:38:17 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 160047 Delivered-To: patch@linaro.org Received: by 2002:a02:5cc1:0:0:0:0:0 with SMTP id w62csp12063055jad; Mon, 11 Mar 2019 08:39:49 -0700 (PDT) X-Google-Smtp-Source: APXvYqwkN4GB/1LWYQEWDZoCcChS5yAKpiqRWPtwHk6Rl7pxns5iqu8ZnOSi0qltWyaOodqk4EUV X-Received: by 2002:a65:6283:: with SMTP id f3mr30719710pgv.125.1552318789858; Mon, 11 Mar 2019 08:39:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552318789; cv=none; d=google.com; s=arc-20160816; b=XTopFJks6/y+mitCfaQ1rpsYt5R+TYuvAl+RrAPxf2x+8l1jwrUolzv6M3mB8HgokN YmevYpSeFmM0fsUS80k0hOAZyJGGv6TzuGBdLANn18Yb3AYLuIbt25FS5eR5MqiW2uvm Lt/keZyMEc0NLA3dwalLTL6ME0uF1ufVoC9KbzARH7LwTkXaJdeYewgJIc6gg6WJTxMt ocPIDJ0zPHcjUj3I+kcTp/1g8wW/HIpWfbL6hAZ8DEGM+a5ufxrVBoaPo3jvsJSdNI5A PB1LONzCu7iYxD9YdGg97nA0XgOWeADwLJVjIfu+K9womY8izj73v9UpANQK3AXVPTi4 SAnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=OAyPh88CDMU2sbqpjd4FX06yTkzeFQhUPy2LLSRJ3Fk=; b=YZTef9fXzKQFBz21EAt3p+fXDLHERYAz02didIa4VIcY9arIw46JyMvmpR5g8qCta1 p22LRQgTSX3Hrs6fwa7iSTATBgi3XJ5RGCw3+mMmcH6FFClzypV6Mh2SkTfeuxFX+mh/ Pab8+LMa+IXe5plTZpv44k+kP1ETdTXxgRSGLPFE8HPlMKIC/JelZgG/8Geps5Hcg60u aXVyzBbGcp2yGvikViz2gt5FZKNV4+7SHH0SMWnExB3Sz2AckO8iuuAhHmbOpjQSmlNa 1OHXerJKkZUPqzrUsBfTrIuQ6E34vculVeMjQcEQUyBrFuhzuF/RzfJ9reI+RyHuQ+PK Acxg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d14si5375923pgn.536.2019.03.11.08.39.49; Mon, 11 Mar 2019 08:39:49 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727683AbfCKPjs (ORCPT + 31 others); Mon, 11 Mar 2019 11:39:48 -0400 Received: from mout.kundenserver.de ([212.227.17.10]:44379 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727153AbfCKPjr (ORCPT ); Mon, 11 Mar 2019 11:39:47 -0400 Received: from wuerfel.lan ([109.192.41.194]) by mrelayeu.kundenserver.de (mreue106 [212.227.15.145]) with ESMTPA (Nemesis) id 1MnqbU-1giwm43Jla-00pJck; Mon, 11 Mar 2019 16:39:02 +0100 From: Arnd Bergmann To: "David S . Miller" Cc: Deepa Dinamani , Willem de Bruijn , linux-alpha@vger.kernel.org, linux-arch@vger.kernel.org, linux-mips@vger.kernel.org, linux-parisc@vger.kernel.org, sparclinux@vger.kernel.org, Laura Abbott , netdev@vger.kernel.org, Arnd Bergmann , linux-kernel@vger.kernel.org Subject: [PATCH] y2038: fix socket.h header inclusion Date: Mon, 11 Mar 2019 16:38:17 +0100 Message-Id: <20190311153857.563743-1-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:hbJOlGFctjSe4uIASWSdvohq94Ci+jZkFRBdQPJ/OWMJENbMYXn p6diVLksQqT/wvIECJWQdSwuaOMZWQ0QLFzjm5MOU1cbl3c6MYiCGGsCzyNWZhVkYC5yLtW j7YY9/8HEBXDzh06CyrsYWzY4rcFhasLmbxOMaLQpnhqIbb35YmXVq/TcxIo+lwnbjS7SLX dnU81YbsyenBlRqPf2TBg== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1; V03:K0:B3/mxksVWSY=:xFc7KSzQwv5Vqct67DwByb Y3V37JImFVImcC6lns6wFika45ZzzLtkS4UBSIGYozSLVEaegao9d+Lri62jpMdqbvzbEg/hN a1Jkcud6zOGJvFz//q330eqeusWDQUIUuBbknFvyaRuMrJerMdvHxozvBh95Ew1ckmBmjP9dq WjqyHMh87EoY8X6fo3iQXs2v9jzBynk7L0b5CgpJuK5kyPkDox/BAtkJONXrV1HVFifM8/Atv 918HtQL0odUeaUK2W4cn1ugP4K0ozbnGoZlBOjP1JKnOgujEnaXkQNPr1CV/uCKH0Njpppl7M VF/g7jAysP6M8yZ+cD86ylBPmClnwqdyPGBzvpdgHrZYWlAw2MulW7xZ50462QVbhFd6l++UK nQEm8IMZVCSC8GZkGSZH4hbQy+1Eox6MNOuYs05+XbpCqeD+amY6FZkvlPpOq8FAl/Vrb+U8J PcHl0SHrlVmpL3Br9dVDhMzgwWhvo1HTTD28Fb2xtb3HNWSzoahJ6dozChNwBbKyDCxJxra0z eKfH6Y5tDP1tOk6uWTa65+V0c+6qlRBiEnJ5yOsTSGENByCaToy+H1cBBveNn3FA1IMsFNMqO RDyITVHC2Md4U/CccXrqXzB79w1JVo9xGX1SbC4RyxIBhljt3EqZHLZdzF58i96PLf1Gl23I6 43FXfE5KyL6BM1/sdHTbVdiRxmn/q2d2vFvFC1hCncdExKo2jRCoLYvU2VcxX/XKcEIvDsKgn z3QzZdIagN6UJkMY4ckBxcahLZ1E5+7FhPABuw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Fixes: a9beb86ae6e5 ("sock: Add SO_RCVTIMEO_NEW and SO_SNDTIMEO_NEW") Signed-off-by: Arnd Bergmann --- arch/alpha/include/uapi/asm/socket.h | 2 +- arch/mips/include/uapi/asm/socket.h | 2 +- arch/parisc/include/uapi/asm/socket.h | 2 +- arch/sparc/include/uapi/asm/socket.h | 2 +- include/uapi/asm-generic/socket.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) -- 2.20.0 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 #include -#include /* For setsockopt(2) */ /* diff --git a/arch/mips/include/uapi/asm/socket.h b/arch/mips/include/uapi/asm/socket.h index eb9f33f8a8b3..d41765cfbc6e 100644 --- a/arch/mips/include/uapi/asm/socket.h +++ b/arch/mips/include/uapi/asm/socket.h @@ -10,8 +10,8 @@ #ifndef _UAPI_ASM_SOCKET_H #define _UAPI_ASM_SOCKET_H +#include #include -#include /* * For setsockopt(2) diff --git a/arch/parisc/include/uapi/asm/socket.h b/arch/parisc/include/uapi/asm/socket.h index 16e428f03526..66c5dd245ac7 100644 --- a/arch/parisc/include/uapi/asm/socket.h +++ b/arch/parisc/include/uapi/asm/socket.h @@ -2,8 +2,8 @@ #ifndef _UAPI_ASM_SOCKET_H #define _UAPI_ASM_SOCKET_H +#include #include -#include /* For setsockopt(2) */ #define SOL_SOCKET 0xffff diff --git a/arch/sparc/include/uapi/asm/socket.h b/arch/sparc/include/uapi/asm/socket.h index 88fe4f978aca..9265a9eece15 100644 --- a/arch/sparc/include/uapi/asm/socket.h +++ b/arch/sparc/include/uapi/asm/socket.h @@ -2,8 +2,8 @@ #ifndef _ASM_SOCKET_H #define _ASM_SOCKET_H +#include #include -#include /* For setsockopt(2) */ #define SOL_SOCKET 0xffff diff --git a/include/uapi/asm-generic/socket.h b/include/uapi/asm-generic/socket.h index c8b430cb6dc4..8c1391c89171 100644 --- a/include/uapi/asm-generic/socket.h +++ b/include/uapi/asm-generic/socket.h @@ -2,8 +2,8 @@ #ifndef __ASM_GENERIC_SOCKET_H #define __ASM_GENERIC_SOCKET_H +#include #include -#include /* For setsockopt(2) */ #define SOL_SOCKET 1