netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next] compat: always include linux/compat.h from net/compat.h
@ 2020-11-21 17:52 Jakub Kicinski
  2020-11-21 18:40 ` Jakub Kicinski
  2020-11-21 21:25 ` Arnd Bergmann
  0 siblings, 2 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-11-21 17:52 UTC (permalink / raw)
  To: davem; +Cc: netdev, hch, arnd, Jakub Kicinski

We're about to do some reshuffling in networking headers and make
some of the file lose the implicit includes. This results in:

In file included from net/ipv4/netfilter/arp_tables.c:26:
include/net/compat.h:57:23: error: conflicting types for ‘uintptr_t’
 #define compat_uptr_t uintptr_t
                       ^~~~~~~~~
include/asm-generic/compat.h:22:13: note: in expansion of macro ‘compat_uptr_t’
 typedef u32 compat_uptr_t;
             ^~~~~~~~~~~~~
In file included from include/linux/limits.h:6,
                 from include/linux/kernel.h:7,
                 from net/ipv4/netfilter/arp_tables.c:14:
include/linux/types.h:37:24: note: previous declaration of ‘uintptr_t’ was here
 typedef unsigned long  uintptr_t;
                        ^~~~~~~~~

Currently net/compat.h depends on linux/compat.h being included
first. After the upcoming changes this would break the 32bit build.

Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
Not sure who officially maintains this. Arnd, Christoph any objections?

 include/net/compat.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/net/compat.h b/include/net/compat.h
index 745db0d605b6..08a089bbaecc 100644
--- a/include/net/compat.h
+++ b/include/net/compat.h
@@ -5,10 +5,10 @@
 
 struct sock;
 
-#if defined(CONFIG_COMPAT)
-
 #include <linux/compat.h>
 
+#if defined(CONFIG_COMPAT)
+
 struct compat_msghdr {
 	compat_uptr_t	msg_name;	/* void * */
 	compat_int_t	msg_namelen;
-- 
2.24.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-11-21 21:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-21 17:52 [PATCH net-next] compat: always include linux/compat.h from net/compat.h Jakub Kicinski
2020-11-21 18:40 ` Jakub Kicinski
2020-11-21 21:25 ` Arnd Bergmann
2020-11-21 21:48   ` Jakub Kicinski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).