mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 11:11:45 -04:00
qcacmn: fix compile error in APPs when include wlan_nlink_common.h
wlan_nlink_common.h include linux/if.h, and linux/if.h refers to 'struct sockaddr' which is defined in linux/socket.h, and so it include linux/socket.h; however, in userspace, linux/socket.h doesn't define 'sockaddr', so it will cause errors when compiling userspace APP if it includs wlan_nlink_common.h. Add macro __KERNEL__ to determine which header file should be included: For userspace, include net/if.h, it will include sys/socket.h, which is for userspace; for kernel space, include linux/if.h. Change-Id: I3a2d8e6edb42871aa3599ef30fbb5d0d275764df CRs-Fixed: 2054409
This commit is contained in:
parent
9737bd7da5
commit
7250c75146
1 changed files with 5 additions and 1 deletions
|
|
@ -38,8 +38,12 @@
|
|||
#define WLAN_NLINK_COMMON_H__
|
||||
|
||||
#include <linux/netlink.h>
|
||||
#include <linux/if.h>
|
||||
|
||||
#ifdef __KERNEL__
|
||||
#include <linux/if.h>
|
||||
#else
|
||||
#include <net/if.h>
|
||||
#endif
|
||||
|
||||
/*---------------------------------------------------------------------------
|
||||
* External Functions
|
||||
|
|
|
|||
Loading…
Reference in a new issue