public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roland Dreier <rolandd@cisco.com>
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] Make if_ether.h compile with CONFIG_SYSCTL=n
Date: Wed, 28 Sep 2005 14:43:00 -0700	[thread overview]
Message-ID: <52vf0kkgwr.fsf@cisco.com> (raw)

<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 */

                 reply	other threads:[~2005-09-28 21:43 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=52vf0kkgwr.fsf@cisco.com \
    --to=rolandd@cisco.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox