Browse Source

Fix USE_KERNEL_HEADERS build with compat-wireless

compat-wireless does not include linux/compiler.h to define __user, so
define it in hostapd code before including linux/wireless.h.
Jouni Malinen 17 years ago
parent
commit
957ed801e9
2 changed files with 10 additions and 0 deletions
  1. 5 0
      hostapd/driver_hostap.c
  2. 5 0
      hostapd/driver_prism54.c

+ 5 - 0
hostapd/driver_hostap.c

@@ -16,6 +16,11 @@
 #include <sys/ioctl.h>
 
 #ifdef USE_KERNEL_HEADERS
+/* compat-wireless does not include linux/compiler.h to define __user, so
+ * define it here */
+#ifndef __user
+#define __user
+#endif /* __user */
 #include <asm/types.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>   /* The L2 protocols */

+ 5 - 0
hostapd/driver_prism54.c

@@ -19,6 +19,11 @@
 #include <sys/select.h>
 
 #ifdef USE_KERNEL_HEADERS
+/* compat-wireless does not include linux/compiler.h to define __user, so
+ * define it here */
+#ifndef __user
+#define __user
+#endif /* __user */
 #include <asm/types.h>
 #include <linux/if_packet.h>
 #include <linux/if_ether.h>   /* The L2 protocols */