xsupplicant: fix compile errors related to iwlib.h
authorFelix Fietkau <nbd@openwrt.org>
Mon, 5 Oct 2009 16:50:13 +0000 (16:50 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Mon, 5 Oct 2009 16:50:13 +0000 (16:50 +0000)
SVN-Revision: 17896

net/xsupplicant/Makefile
net/xsupplicant/patches/004-linux_2.6.19_wireless_h.patch [deleted file]
net/xsupplicant/patches/005-no_private_linux_header_includes.patch
net/xsupplicant/patches/006-no_wireless_h.patch

index 03296e5..ec56621 100644 (file)
@@ -36,6 +36,8 @@ define Package/xsupplicant/conffiles
 /etc/xsupplicant.conf
 endef
 
+TARGET_CFLAGS += --std=gnu99
+
 CONFIGURE_ARGS+= \
        --with-openssl="$(STAGING_DIR)/usr" \
        --with-madwifi-path="$(STAGING_DIR)/usr/include/madwifi" \
diff --git a/net/xsupplicant/patches/004-linux_2.6.19_wireless_h.patch b/net/xsupplicant/patches/004-linux_2.6.19_wireless_h.patch
deleted file mode 100644 (file)
index 97e610c..0000000
+++ /dev/null
@@ -1,62 +0,0 @@
---- a/configure
-+++ b/configure
-@@ -4759,6 +4759,11 @@ cat >>conftest.$ac_ext <<_ACEOF
-    #ifndef __user
-    #define __user
-    #endif
-+   #include <linux/version.h>
-+   #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
-+   #include <linux/types.h>
-+   #include <linux/if.h>
-+   #endif
-    #include <linux/wireless.h>
- #include <$ac_header>
-@@ -4823,6 +4828,11 @@ cat >>conftest.$ac_ext <<_ACEOF
-                  #ifndef __user
-                  #define __user
-                  #endif
-+                 #include <linux/version.h>
-+                 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
-+                 #include <linux/types.h>
-+                 #include <linux/if.h>
-+                 #endif
-                    #include <linux/wireless.h>
-                    #include <iwlib.h>
- int
---- a/configure.in
-+++ b/configure.in
-@@ -119,6 +119,11 @@ if test $SYSTEM = "Linux"; then
-    #ifndef __user
-    #define __user
-    #endif
-+   #include <linux/version.h>
-+   #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
-+   #include <linux/types.h>
-+   #include <linux/if.h>
-+   #endif
-    #include <linux/wireless.h>])
-    AC_MSG_CHECKING([iwlib version])
-@@ -127,6 +132,11 @@ if test $SYSTEM = "Linux"; then
-                  #ifndef __user
-                  #define __user
-                  #endif
-+                 #include <linux/version.h>
-+                 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
-+                 #include <linux/types.h>
-+                 #include <linux/if.h>
-+                 #endif
-                    #include <linux/wireless.h>
-                    #include <iwlib.h>], 
-                [iw_extract_event_stream(NULL, NULL, 0);], [AC_DEFINE(NEW_IWLIB) AC_MSG_RESULT([3 params])], [AC_MSG_RESULT([2 params])])
---- a/src/cardif/linux/cardif_linux_wext.c
-+++ b/src/cardif/linux/cardif_linux_wext.c
-@@ -204,6 +204,7 @@
- #include <linux/types.h>
- #include <linux/socket.h>
- #include <linux/compiler.h>
-+#include <linux/if.h>
- #include <linux/wireless.h>
- #include <iwlib.h>
- #include <linux/if_packet.h>
index 5c67598..3caf928 100644 (file)
@@ -43,6 +43,6 @@ Index: xsupplicant-1.2.8/src/cardif/linux/cardif_linux_wext.c
  #include <linux/types.h>
  #include <linux/socket.h>
 -#include <linux/compiler.h>
- #include <linux/if.h>
  #include <linux/wireless.h>
  #include <iwlib.h>
+ #include <linux/if_packet.h>
index 8a93193..378e21f 100644 (file)
@@ -1,46 +1,5 @@
-diff -urN xsupplicant-1.2.8/configure xsupplicant-1.2.8.new/configure
---- xsupplicant-1.2.8/configure        2009-05-12 15:12:47.000000000 +0200
-+++ xsupplicant-1.2.8.new/configure    2009-05-12 15:13:29.000000000 +0200
-@@ -4764,7 +4764,6 @@
-    #include <linux/types.h>
-    #include <linux/if.h>
-    #endif
--   #include <linux/wireless.h>
- #include <$ac_header>
- _ACEOF
-@@ -4833,7 +4832,6 @@
-                  #include <linux/types.h>
-                  #include <linux/if.h>
-                  #endif
--                   #include <linux/wireless.h>
-                    #include <iwlib.h>
- int
- main ()
-diff -urN xsupplicant-1.2.8/configure.in xsupplicant-1.2.8.new/configure.in
---- xsupplicant-1.2.8/configure.in     2009-05-12 15:12:47.000000000 +0200
-+++ xsupplicant-1.2.8.new/configure.in 2009-05-12 15:13:57.000000000 +0200
-@@ -123,8 +123,7 @@
-    #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,19)
-    #include <linux/types.h>
-    #include <linux/if.h>
--   #endif
--   #include <linux/wireless.h>])
-+   #endif])
-    AC_MSG_CHECKING([iwlib version])
-    AC_TRY_COMPILE([#define HEADERS_KERNEL
-@@ -137,7 +136,6 @@
-                  #include <linux/types.h>
-                  #include <linux/if.h>
-                  #endif
--                   #include <linux/wireless.h>
-                    #include <iwlib.h>], 
-                [iw_extract_event_stream(NULL, NULL, 0);], [AC_DEFINE(NEW_IWLIB) AC_MSG_RESULT([3 params])], [AC_MSG_RESULT([2 params])])
- fi
-diff -urN xsupplicant-1.2.8/src/cardif/linux/cardif_atmel_driver.c xsupplicant-1.2.8.new/src/cardif/linux/cardif_atmel_driver.c
---- xsupplicant-1.2.8/src/cardif/linux/cardif_atmel_driver.c   2009-05-12 15:12:47.000000000 +0200
-+++ xsupplicant-1.2.8.new/src/cardif/linux/cardif_atmel_driver.c       2009-05-12 15:14:30.000000000 +0200
+--- a/src/cardif/linux/cardif_atmel_driver.c
++++ b/src/cardif/linux/cardif_atmel_driver.c
 @@ -109,7 +109,6 @@
  #include <unistd.h>
  #include <errno.h>
@@ -49,9 +8,8 @@ diff -urN xsupplicant-1.2.8/src/cardif/linux/cardif_atmel_driver.c xsupplicant-1
  
  #ifdef USE_EFENCE
  #include <efence.h>
-diff -urN xsupplicant-1.2.8/src/cardif/linux/cardif_linux.c xsupplicant-1.2.8.new/src/cardif/linux/cardif_linux.c
---- xsupplicant-1.2.8/src/cardif/linux/cardif_linux.c  2009-05-12 15:12:47.000000000 +0200
-+++ xsupplicant-1.2.8.new/src/cardif/linux/cardif_linux.c      2009-05-12 15:14:40.000000000 +0200
+--- a/src/cardif/linux/cardif_linux.c
++++ b/src/cardif/linux/cardif_linux.c
 @@ -180,7 +180,6 @@
  #include <errno.h>
  #include <unistd.h>
@@ -60,25 +18,44 @@ diff -urN xsupplicant-1.2.8/src/cardif/linux/cardif_linux.c xsupplicant-1.2.8.ne
  
  #include "xsupconfig.h"
  #include "profile.h"
-diff -urN xsupplicant-1.2.8/src/cardif/linux/cardif_linux_rtnetlink.c xsupplicant-1.2.8.new/src/cardif/linux/cardif_linux_rtnetlink.c
---- xsupplicant-1.2.8/src/cardif/linux/cardif_linux_rtnetlink.c        2009-05-12 15:12:47.000000000 +0200
-+++ xsupplicant-1.2.8.new/src/cardif/linux/cardif_linux_rtnetlink.c    2009-05-12 15:14:47.000000000 +0200
-@@ -210,7 +210,6 @@
- #include <linux/if.h>
+--- a/src/cardif/linux/cardif_linux_rtnetlink.c
++++ b/src/cardif/linux/cardif_linux_rtnetlink.c
+@@ -207,10 +207,8 @@
+ #include <sys/ioctl.h>
+ #include "netlink.h"
+ #include "rtnetlink.h"
+-#include <linux/if.h>
  #include <linux/if_packet.h>
  #include <math.h>
 -#include <linux/wireless.h>
  
  #include "profile.h"
  #include "xsupconfig.h"
-diff -urN xsupplicant-1.2.8/src/cardif/linux/cardif_linux_wext.c xsupplicant-1.2.8.new/src/cardif/linux/cardif_linux_wext.c
---- xsupplicant-1.2.8/src/cardif/linux/cardif_linux_wext.c     2009-05-12 15:12:47.000000000 +0200
-+++ xsupplicant-1.2.8.new/src/cardif/linux/cardif_linux_wext.c 2009-05-12 15:14:58.000000000 +0200
-@@ -204,7 +204,6 @@
+--- a/src/cardif/linux/cardif_linux_wext.c
++++ b/src/cardif/linux/cardif_linux_wext.c
+@@ -203,7 +203,6 @@
+ #include <netinet/in.h>
  #include <linux/types.h>
  #include <linux/socket.h>
- #include <linux/if.h>
 -#include <linux/wireless.h>
  #include <iwlib.h>
  #include <linux/if_packet.h>
  #include <linux/netlink.h>
+--- a/configure
++++ b/configure
+@@ -4759,7 +4759,6 @@ cat >>conftest.$ac_ext <<_ACEOF
+    #ifndef __user
+    #define __user
+    #endif
+-   #include <linux/wireless.h>
+ #include <$ac_header>
+ _ACEOF
+@@ -4823,7 +4822,6 @@ cat >>conftest.$ac_ext <<_ACEOF
+                  #ifndef __user
+                  #define __user
+                  #endif
+-                   #include <linux/wireless.h>
+                    #include <iwlib.h>
+ int
+ main ()