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.
This commit is contained in:
Jouni Malinen 2008-06-03 11:57:52 +03:00
parent 7e1488494e
commit 957ed801e9
2 changed files with 10 additions and 0 deletions

View file

@ -16,6 +16,11 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#ifdef USE_KERNEL_HEADERS #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 <asm/types.h>
#include <linux/if_packet.h> #include <linux/if_packet.h>
#include <linux/if_ether.h> /* The L2 protocols */ #include <linux/if_ether.h> /* The L2 protocols */

View file

@ -19,6 +19,11 @@
#include <sys/select.h> #include <sys/select.h>
#ifdef USE_KERNEL_HEADERS #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 <asm/types.h>
#include <linux/if_packet.h> #include <linux/if_packet.h>
#include <linux/if_ether.h> /* The L2 protocols */ #include <linux/if_ether.h> /* The L2 protocols */