aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJörg Krause <joerg.krause@embedded.rocks>2016-03-08 11:05:01 (GMT)
committerJouni Malinen <j@w1.fi>2016-03-25 14:57:05 (GMT)
commitcb38bc886e66d7ef20728fa6516aa28384a5febe (patch)
treead07daf302de2d473591822e6f06094e80ff9262
parent954e10e483a0b98c1dc3a8ad1f5c2d3a9ef5b781 (diff)
downloadhostap-cb38bc886e66d7ef20728fa6516aa28384a5febe.zip
hostap-cb38bc886e66d7ef20728fa6516aa28384a5febe.tar.gz
hostap-cb38bc886e66d7ef20728fa6516aa28384a5febe.tar.bz2
vlan: Fix musl build error
caddr_t is legacy BSD and should be avoided [1]. While glibc may still use __caddr_t as the type, Linux kernel does not (it is "void __user * ifru_data"). This fixes compile errors with the musl libc: ../src/ap/vlan_init.c: In function 'br_delif': ../src/ap/vlan_init.c:218:18: error: '__caddr_t' undeclared (first use in this function) ifr.ifr_data = (__caddr_t) args; [1] http://stackoverflow.com/questions/6381526/what-is-the-significance-of-caddr-t-and-when-is-it-used Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
-rw-r--r--src/ap/vlan_init.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c
index 45d1a1c..d2f6dc3 100644
--- a/src/ap/vlan_init.c
+++ b/src/ap/vlan_init.c
@@ -280,7 +280,7 @@ static int br_delif(const char *br_name, const char *if_name)
args[1] = if_index;
os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name));
- ifr.ifr_data = (__caddr_t) args;
+ ifr.ifr_data = (void *) args;
if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0 && errno != EINVAL) {
/* No error if interface already removed. */
@@ -331,7 +331,7 @@ static int br_addif(const char *br_name, const char *if_name)
args[1] = if_index;
os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name));
- ifr.ifr_data = (__caddr_t) args;
+ ifr.ifr_data = (void *) args;
if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0) {
if (errno == EBUSY) {
@@ -459,7 +459,7 @@ static int br_getnumports(const char *br_name)
os_memset(ifindices, 0, sizeof(ifindices));
os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name));
- ifr.ifr_data = (__caddr_t) arg;
+ ifr.ifr_data = (void *) arg;
if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0) {
wpa_printf(MSG_ERROR, "VLAN: %s: BRCTL_GET_PORT_LIST "