lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 28 Jul 2011 16:37:39 +0800
From:	Weiping Pan <panweiping3@...il.com>
To:	netdev@...r.kernel.org
Cc:	Weiping Pan <panweiping3@...il.com>
Subject: [PATCH net-next 1/2] stp:add netdevice.h into stp.h

We don't meet a compile error becasue <linux/netdevice.h>
is added by ohter header files, luckily.

I find this problem when I want to remove the duplicate <linux/if_vlan.h>.
As net/8021q/vlan.h already includes it, so other files that includes vlan.h
need not to include it.

But when I remove <linux/if_vlan.h> from net/8021q/vlan_gvrp.c,
I met a compile error.
[pwp@...alhost net-next]$ make O=../net-next_build/ M=net/8021q
  CC      net/8021q/vlan_core.o
  LD      net/8021q/built-in.o
  CC [M]  net/8021q/vlan.o
  CC [M]  net/8021q/vlan_dev.o
  CC [M]  net/8021q/vlan_netlink.o
  CC [M]  net/8021q/vlan_gvrp.o
In file included from /home/pwp/mysvn/linux/net-next/include/net/garp.h:4:0,
                 from /home/pwp/mysvn/linux/net-next/net/8021q/vlan_gvrp.c:12:
/home/pwp/mysvn/linux/net-next/include/net/stp.h:5:30: error: ‘ETH_ALEN’ undeclared here (not in a function)
/home/pwp/mysvn/linux/net-next/include/net/stp.h:7:18: warning: ‘struct net_device’ declared inside parameter list
/home/pwp/mysvn/linux/net-next/include/net/stp.h:7:18: warning: its scope is only this definition or declaration, which is probably not what you want
/home/pwp/mysvn/linux/net-next/include/net/stp.h:7:18: warning: ‘struct sk_buff’ declared inside parameter list
In file included from /home/pwp/mysvn/linux/net-next/net/8021q/vlan_gvrp.c:12:0:
/home/pwp/mysvn/linux/net-next/include/net/garp.h:36:50: warning: ‘struct sk_buff’ declared inside parameter list
/home/pwp/mysvn/linux/net-next/include/net/garp.h: In function ‘garp_cb’:
/home/pwp/mysvn/linux/net-next/include/net/garp.h:38:2: error: implicit declaration of function ‘BUILD_BUG_ON’
/home/pwp/mysvn/linux/net-next/include/net/garp.h:39:8: error: implicit declaration of function ‘FIELD_SIZEOF’
/home/pwp/mysvn/linux/net-next/include/net/garp.h:39:21: error: expected expression before ‘struct’
/home/pwp/mysvn/linux/net-next/include/net/garp.h:40:34: error: dereferencing pointer to incomplete type
/home/pwp/mysvn/linux/net-next/include/net/garp.h: At top level:
/home/pwp/mysvn/linux/net-next/include/net/garp.h:79:19: error: field ‘node’ has incomplete type
/home/pwp/mysvn/linux/net-next/include/net/garp.h:101:20: error: field ‘join_timer’ has incomplete type
/home/pwp/mysvn/linux/net-next/include/net/garp.h:103:2: error: expected specifier-qualifier-list before ‘spinlock_t’
/home/pwp/mysvn/linux/net-next/include/net/garp.h:112:20: error: field ‘rcu’ has incomplete type
make[2]: *** [net/8021q/vlan_gvrp.o] Error 1
make[1]: *** [_module_net/8021q] Error 2
make: *** [sub-make] Error 2

Signed-off-by: Weiping Pan <panweiping3@...il.com>
---
 include/net/stp.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/net/stp.h b/include/net/stp.h
index ad447f1..13318f3 100644
--- a/include/net/stp.h
+++ b/include/net/stp.h
@@ -1,6 +1,8 @@
 #ifndef _NET_STP_H
 #define _NET_STP_H
 
+#include <linux/netdevice.h>
+
 struct stp_proto {
 	unsigned char	group_address[ETH_ALEN];
 	void		(*rcv)(const struct stp_proto *, struct sk_buff *,
-- 
1.7.4.4

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ