From: Pavel Roskin <proski@gnu.org>
To: "Luis R. Rodriguez" <mcgrof@gmail.com>
Cc: wireless <linux-wireless@vger.kernel.org>, ath5k-devel@lists.ath5k.org
Subject: Re: Linux wireless compatibility package for kernels >= 2.6.22
Date: Wed, 14 Nov 2007 13:02:04 -0500 [thread overview]
Message-ID: <1195063324.1739.9.camel@dv> (raw)
In-Reply-To: <43e72e890711131510v2189669di962214c46a2e96de@mail.gmail.com>
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@gnu.org>
---
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
next prev parent reply other threads:[~2007-11-14 18:02 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-11 3:53 Linux wireless compatibility package for kernels >= 2.6.22 Luis R. Rodriguez
2007-11-12 4:27 ` Pavel Roskin
2007-11-13 23:10 ` Luis R. Rodriguez
2007-11-14 18:02 ` Pavel Roskin [this message]
2007-11-16 23:54 ` Luis R. Rodriguez
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=1195063324.1739.9.camel@dv \
--to=proski@gnu.org \
--cc=ath5k-devel@lists.ath5k.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mcgrof@gmail.com \
/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