Skip to content

Commit

Permalink
[NET]: Fix GCC4 compile error: sysctl in linux/if_ether.h
Browse files Browse the repository at this point in the history
The following is generated when compiling a
recent (2.6.14-rc2-git5) kernel configured for
ARM, with GCC4. 

  CC      init/main.o
In file included from include/linux/netdevice.h:29,
                 from include/net/sock.h:48,
                 from init/main.c:50:
include/linux/if_ether.h:114: error: array type has incomplete element type

It seems that if CONFIG_SYSCTL is not set, then
the compiler will throw an error due to the definition
of the ether_table[] array

Attached is a solution to the problem

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Ben Dooks authored and David S. Miller committed Sep 27, 2005
1 parent 520d1b8 commit 2fab35d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions include/linux/if_ether.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,9 @@ static inline struct ethhdr *eth_hdr(const struct sk_buff *skb)
return (struct ethhdr *)skb->mac.raw;
}

#ifdef CONFIG_SYSCTL
extern struct ctl_table ether_table[];
#endif
#endif

#endif /* _LINUX_IF_ETHER_H */

0 comments on commit 2fab35d

Please sign in to comment.