1 From 67ba6ed9871b2cab16eeee93818f05d9c49ccbab Mon Sep 17 00:00:00 2001
2 From: =?UTF-8?q?J=C3=B6rg=20Krause?= <joerg.krause@embedded.rocks>
3 Date: Tue, 8 Mar 2016 12:05:01 +0100
4 Subject: [PATCH] vlan: fix musl build error
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
9 caddr_t is legacy BSD and should be avoided [1].
11 This fixes compile errors with the musl libc:
13 ../src/ap/vlan_init.c: In function 'br_delif':
14 ../src/ap/vlan_init.c:218:18: error: '__caddr_t' undeclared (first use in this function)
15 ifr.ifr_data = (__caddr_t) args;
17 Upstream status: Pending [2]
19 [1] http://stackoverflow.com/questions/6381526/what-is-the-significance-of-caddr-t-and-when-is-it-used
20 [2] http://lists.infradead.org/pipermail/hostap/2016-March/035350.html
22 Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
24 src/ap/vlan_init.c | 6 +++---
25 1 file changed, 3 insertions(+), 3 deletions(-)
27 diff --git a/src/ap/vlan_init.c b/src/ap/vlan_init.c
28 index fd1c8dd..1670c0d 100644
29 --- a/src/ap/vlan_init.c
30 +++ b/src/ap/vlan_init.c
31 @@ -215,7 +215,7 @@ static int br_delif(const char *br_name, const char *if_name)
34 os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name));
35 - ifr.ifr_data = (__caddr_t) args;
36 + ifr.ifr_data = (void *) args;
38 if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0 && errno != EINVAL) {
39 /* No error if interface already removed. */
40 @@ -266,7 +266,7 @@ static int br_addif(const char *br_name, const char *if_name)
43 os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name));
44 - ifr.ifr_data = (__caddr_t) args;
45 + ifr.ifr_data = (void *) args;
47 if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0) {
49 @@ -394,7 +394,7 @@ static int br_getnumports(const char *br_name)
51 os_memset(ifindices, 0, sizeof(ifindices));
52 os_strlcpy(ifr.ifr_name, br_name, sizeof(ifr.ifr_name));
53 - ifr.ifr_data = (__caddr_t) arg;
54 + ifr.ifr_data = (void *) arg;
56 if (ioctl(fd, SIOCDEVPRIVATE, &ifr) < 0) {
57 wpa_printf(MSG_ERROR, "VLAN: %s: BRCTL_GET_PORT_LIST "