Search Linux Wireless

Re: Linux wireless compatibility package for kernels >= 2.6.22

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello, Luis!

On Tue, 2007-11-13 at 18:10 -0500, Luis R. Rodriguez wrote:

> I ran into to this but I had fixed it in compat.diff. Anyway, this
> won't be necessary anymore as the directories match the kernel's now.

OK, that's much better now.

> > After some hack to make it compile, I still get:
> >
> >   CC [M]  /home/proski/src/compat-wireless-2.6/mac80211/ieee80211.o
> > /home/proski/src/compat-wireless-2.6/mac80211/ieee80211.c:24:6: warning:
> > "LINUX_VERSION_CODE" is not defined
> > /home/proski/src/compat-wireless-2.6/mac80211/ieee80211.c:24:28:
> > warning: "KERNEL_VERSION" is not defined
> > /home/proski/src/compat-wireless-2.6/mac80211/ieee80211.c:24:42: error:
> > missing binary operator before token "("
> 
> I'm not sure what happened here as <linux/version.h> should have been
> included in mac80211.h. Anyway, to be sure we won't run into these
> I've added <net/compat.h> to <net/cfg80211.h> which much of the
> wireless subsystem uses.

This problem is still there.  I think the best approach would be to
"force-feed" compat.h to the compiler.  It already includes
linux/version.h, but since it's the first header, it needs
linux/autoconf.h.

The following patch works for me.  The compat.diff patch can be cleaned
up, but it's a separate issue.


Force inclusion of compat.h first.

Include linux/autoconf.h before other headers.

Signed-off-by: Pavel Roskin <proski@xxxxxxx>
---

 Makefile        |    2 +-
 compat/compat.h |    1 +
 2 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Makefile b/Makefile
index af1e02f..f1c39a9 100644
--- a/Makefile
+++ b/Makefile
@@ -13,7 +13,7 @@ ifneq ($(KERNELRELEASE),)
 -include $(src)/config.mk
 
 # This is a hack! But hey.. it works, got any better ideas, send a patch ;)
-NOSTDINC_FLAGS := -I$(PWD)/include/ $(CFLAGS)
+NOSTDINC_FLAGS := -I$(PWD)/include/ -include $(M)/compat/compat.h $(CFLAGS)
 
 obj-y := net/wireless/ net/mac80211/  \
 	drivers/net/wireless/ath5k/ \
diff --git a/compat/compat.h b/compat/compat.h
index 6ae32ef..05995f2 100644
--- a/compat/compat.h
+++ b/compat/compat.h
@@ -1,6 +1,7 @@
 #ifndef LINUX_26_COMPAT_H
 #define LINUX_26_COMPAT_H
 
+#include <linux/autoconf.h>
 #include <linux/kernel.h>
 #include <linux/netdevice.h>
 #include <linux/genetlink.h>


-- 
Regards,
Pavel Roskin

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

[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Device Mapper]
  Powered by Linux