-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
Hi. Been trying to compile this on Android and I'm not sure if the patch stops it from working or if I am doing something wrong.
I've installed the Android NDK and built the tool chain like so:
cd /opt/android-ndk/build/tools
/make_standalone_toolchain.py --arch arm --api 24 --install-dir=/opt/android-ndk/arm-toolchain-api24
export CC=arm-linux-androideabi-gcc
export PATH=$PATH:/opt/android-ndk/arm-toolchain-api24/bin
export ARCH=arm
export SUBARCH=arm
export CROSS_COMPILE=/opt/android-ndk/arm-toolchain-api24/bin/arm-linux-androideabi-
CFLAGS=' -MMD -O2 -Wall -g -I/usr/include/openssl-1.0 -I/usr/include/libnl3' LDFLAGS=' -L/usr/lib/openssl-1.0 ' make
Which gives the following output:
CC main.c
CC config_file.c
CC ../src/ap/hostapd.c
CC ../src/ap/wpa_auth_glue.c
CC ../src/ap/drv_callbacks.c
CC ../src/ap/ap_drv_ops.c
CC ../src/ap/utils.c
CC ../src/ap/authsrv.c
CC ../src/ap/ieee802_1x.c
CC ../src/ap/ap_config.c
CC ../src/ap/eap_user_db.c
CC ../src/ap/ieee802_11_auth.c
CC ../src/ap/sta_info.c
CC ../src/ap/wpa_auth.c
CC ../src/ap/tkip_countermeasures.c
CC ../src/ap/ap_mlme.c
CC ../src/ap/wpa_auth_ie.c
CC ../src/ap/preauth_auth.c
CC ../src/ap/pmksa_cache_auth.c
CC ../src/ap/ieee802_11_shared.c
CC ../src/ap/beacon.c
CC ../src/ap/bss_load.c
CC ../src/ap/neighbor_db.c
CC ../src/ap/rrm.c
CC ../src/wpe/wpe.c
CC ../src/drivers/drivers.c
CC ../src/utils/eloop.c
CC ../src/utils/common.c
CC ../src/utils/wpa_debug.c
CC ../src/utils/wpabuf.c
CC ../src/utils/os_unix.c
CC ../src/utils/ip_addr.c
CC ../src/common/ieee802_11_common.c
CC ../src/common/wpa_common.c
CC ../src/common/hw_features_common.c
CC ../src/eapol_auth/eapol_auth_sm.c
CC ../src/eapol_auth/eapol_auth_dump.c
CC ../src/radius/radius.c
CC ../src/radius/radius_client.c
CC ../src/radius/radius_das.c
CC ../src/ap/vlan_init.c
CC ../src/ap/vlan_ifconfig.c
CC ../src/ap/vlan.c
CC ../src/common/ctrl_iface_common.c
CC ctrl_iface.c
CC ../src/ap/ctrl_iface_ap.c
CC ../src/ap/iapp.c
CC ../src/ap/peerkey_auth.c
In file included from ../src/drivers/linux_wext.h:35:0,
from ../src/drivers/driver_hostap.c:12:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/wireless.h:451:12: error: 'IFNAMSIZ' undeclared here (not in a function)
char name[IFNAMSIZ];
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:48:0: warning: "NLMSG_ALIGNTO" redefined
#define NLMSG_ALIGNTO 4
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:86:0: note: this is the location of the previous definition
#define NLMSG_ALIGNTO 4U
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:49:0: warning: "NLMSG_ALIGN" redefined
#define NLMSG_ALIGN(len) (((len) + NLMSG_ALIGNTO - 1) & ~(NLMSG_ALIGNTO - 1))
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:87:0: note: this is the location of the previous definition
#define NLMSG_ALIGN(len) ( ((len)+NLMSG_ALIGNTO-1) & ~(NLMSG_ALIGNTO-1) )
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:51:0: warning: "NLMSG_LENGTH" redefined
#define NLMSG_LENGTH(len) ((len) + NLMSG_ALIGN(sizeof(struct nlmsghdr)))
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:90:0: note: this is the location of the previous definition
#define NLMSG_LENGTH(len) ((len) + NLMSG_HDRLEN)
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:53:0: warning: "NLMSG_DATA" redefined
#define NLMSG_DATA(nlh) ((void*) (((char*) nlh) + NLMSG_LENGTH(0)))
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:92:0: note: this is the location of the previous definition
#define NLMSG_DATA(nlh) ((void*)(((char*)nlh) + NLMSG_LENGTH(0)))
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:54:0: warning: "NLMSG_NEXT" redefined
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), \
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:94:0: note: this is the location of the previous definition
#define NLMSG_NEXT(nlh,len) ((len) -= NLMSG_ALIGN((nlh)->nlmsg_len), (struct nlmsghdr*)(((char*)(nlh)) + NLMSG_ALIGN((nlh)->nlmsg_len)))
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:57:0: warning: "NLMSG_OK" redefined
#define NLMSG_OK(nlh,len) ((len) >= (int) sizeof(struct nlmsghdr) && \
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:95:0: note: this is the location of the previous definition
#define NLMSG_OK(nlh,len) ((len) >= (int)sizeof(struct nlmsghdr) && (nlh)->nlmsg_len >= sizeof(struct nlmsghdr) && (nlh)->nlmsg_len <= (len))
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:76:8: error: redefinition of 'struct sockaddr_nl'
struct sockaddr_nl
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:54:8: note: originally defined here
struct sockaddr_nl {
^
In file included from ../src/drivers/driver_hostap.c:23:0:
../src/drivers/priv_netlink.h:84:8: error: redefinition of 'struct nlmsghdr'
struct nlmsghdr
^
In file included from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_link.h:22:0,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netdevice.h:25,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/if_arp.h:21,
from /opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/net/if_arp.h:2,
from ../src/drivers/driver_hostap.c:20:
/opt/android-ndk/arm-toolchain-api24/sysroot/usr/include/linux/netlink.h:61:8: note: originally defined here
struct nlmsghdr {
^
../src/drivers/driver_hostap.c: In function 'hostap_init_sockets':
../src/drivers/driver_hostap.c:218:15: error: storage size of 'ifr' isn't known
struct ifreq ifr;
^
../src/drivers/driver_hostap.c:218:15: warning: unused variable 'ifr' [-Wunused-variable]
../src/drivers/driver_hostap.c: In function 'hostap_set_iface_flags':
../src/drivers/driver_hostap.c:348:15: error: storage size of 'ifr' isn't known
struct ifreq ifr;
^
../src/drivers/driver_hostap.c:348:15: warning: unused variable 'ifr' [-Wunused-variable]
../src/drivers/driver_hostap.c: In function 'hostapd_ioctl':
../src/drivers/driver_hostap.c:377:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
../src/drivers/driver_hostap.c: In function 'hostap_ioctl_prism2param':
../src/drivers/driver_hostap.c:491:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
../src/drivers/driver_hostap.c: In function 'hostap_set_ssid':
../src/drivers/driver_hostap.c:549:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
../src/drivers/driver_hostap.c: In function 'hostap_get_we_version':
../src/drivers/driver_hostap.c:912:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
../src/drivers/driver_hostap.c: In function 'hostap_set_freq':
../src/drivers/driver_hostap.c:1059:16: error: 'struct iwreq' has no member named 'ifr_name'
os_strlcpy(iwr.ifr_name, drv->iface, IFNAMSIZ);
^
make: *** [Makefile:1037: ../src/drivers/driver_hostap.o] Error 1
Metadata
Metadata
Assignees
Labels
No labels