Skip to contentSkip to conversation

2.5.69-bk7: wireless.c must include module.h

PATCH Applied Adrian Bunk 3 participants 3 messages May 12, 2003 Networking

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 2.5.69-bk7: wireless.c must include module.h

<-- snip -->

...
gcc -Wp,-MD,net/core/.wireless.o.d -D__KERNEL__ -Iinclude -Wall
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2 -march=k6 -Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include -DKBUILD_BASENAME=wireless -DKBUILD_MODNAME=wireless -c -o net/core/wireless.o net/core/wireless.c
net/core/wireless.c:488: THIS_MODULE' undeclared here (not in a function) net/core/wireless.c:488: initializer element is not constant net/core/wireless.c:488: (near initialization for wireless_seq_fops.owner') make[2]: *** [net/core/wireless.o] Error 1

<-- snip -->

The fix is simple:

net/core/wireless.c renamed from net/core/wireless.c.old +1 -0
@@ -60,6 +60,7 @@
 #include <linux/seq_file.h>
 #include <linux/init.h>			/* for __init */
 #include <linux/if_arp.h>		/* ARPHRD_ETHER */
+#include <linux/module.h>
 
 #include <linux/wireless.h>		/* Pretty obvious */
 #include <net/iw_handler.h>		/* New driver API */

cu
Adrian

Signature · 4 lines
       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed
#2 lore raw
In reply to Adrian Bunk
Quoted 32 lines · Adrian Bunk

<-- snip -->

...
gcc -Wp,-MD,net/core/.wireless.o.d -D__KERNEL__ -Iinclude -Wall

(quoted diff) +0 -4
-Wstrict-prototypes -Wno-trigraphs -O2 -fno-strict-aliasing -fno-common 
-pipe -mpreferred-stack-boundary=2 -march=k6 
-Iinclude/asm-i386/mach-default -nostdinc -iwithprefix include    
-DKBUILD_BASENAME=wireless -DKBUILD_MODNAME=wireless -c -o 

net/core/wireless.o net/core/wireless.c
net/core/wireless.c:488: THIS_MODULE' undeclared here (not in a function) net/core/wireless.c:488: initializer element is not constant net/core/wireless.c:488: (near initialization for wireless_seq_fops.owner') make[2]: *** [net/core/wireless.o] Error 1

<-- snip -->

The fix is simple:

net/core/wireless.c renamed from net/core/wireless.c.old +1 -0
@@ -60,6 +60,7 @@
 #include <linux/seq_file.h>
 #include <linux/init.h>			/* for __init */
 #include <linux/if_arp.h>		/* ARPHRD_ETHER */
+#include <linux/module.h>
 
 #include <linux/wireless.h>		/* Pretty obvious */
 #include <net/iw_handler.h>		/* New driver API */
Quoted 2 lines

cu
Adrian

I still managed to beat you by a few minute ;-)
http://marc.theaimsgroup.com/?l=linux-kernel&m=105276406917601&w=2

Thanks !

Jean