* [PATCH] Make if_ether.h compile with CONFIG_SYSCTL=n
@ 2005-09-28 21:43 Roland Dreier
0 siblings, 0 replies; only message in thread
From: Roland Dreier @ 2005-09-28 21:43 UTC (permalink / raw)
To: akpm; +Cc: linux-kernel
<linux/if_ether.h> tries to declare a sysctl table even if
CONFIG_SYSCTL is not defined, which breaks the build as below:
CC init/main.o
In file included from /scratch/Ksrc/linux-git/include/linux/netdevice.h:29,
from /scratch/Ksrc/linux-git/include/net/sock.h:48,
from /scratch/Ksrc/linux-git/init/main.c:50:
/scratch/Ksrc/linux-git/include/linux/if_ether.h:114: error: array type has incomplete element type
This patch wraps the declaration inside an #ifdef CONFIG_SYSCTL and
fixes my allnoconfig build.
Signed-off-by: Roland Dreier <rolandd@cisco.com>
diff --git a/include/linux/if_ether.h b/include/linux/if_ether.h
--- a/include/linux/if_ether.h
+++ b/include/linux/if_ether.h
@@ -104,6 +104,7 @@ struct ethhdr {
} __attribute__((packed));
#ifdef __KERNEL__
+#include <linux/config.h>
#include <linux/skbuff.h>
static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
@@ -111,7 +112,9 @@ static inline struct ethhdr *eth_hdr(con
return (struct ethhdr *)skb->mac.raw;
}
+#ifdef CONFIG_SYSCTL
extern struct ctl_table ether_table[];
#endif
+#endif
#endif /* _LINUX_IF_ETHER_H */
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2005-09-28 21:43 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-09-28 21:43 [PATCH] Make if_ether.h compile with CONFIG_SYSCTL=n Roland Dreier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox