3
0
mirror of https://git.kernel.org/pub/scm/network/wireless/iwd.git synced 2024-11-22 06:29:23 +01:00

build: Fix includes for using with -std=c99 compiler option

This commit is contained in:
Marcel Holtmann 2018-11-01 22:37:11 +01:00
parent d0fd928af2
commit 554e4f55db
14 changed files with 29 additions and 14 deletions

View File

@ -367,7 +367,7 @@ static void handle_challenge(struct eap_state *eap, const uint8_t *pkt,
goto chal_error; goto chal_error;
} }
aka->kdf_in = strndup((const char *)(contents + 2), aka->kdf_in = l_strndup((const char *)(contents + 2),
kdf_in_len); kdf_in_len);
break; break;

View File

@ -27,6 +27,7 @@
#include <ctype.h> #include <ctype.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <alloca.h>
#include <ell/ell.h> #include <ell/ell.h>
#include "eap.h" #include "eap.h"

View File

@ -1290,7 +1290,7 @@ static bool eap_wsc_load_settings(struct eap_state *eap,
'A' + wsc->device_password[i] - 'a'; 'A' + wsc->device_password[i] - 'a';
} }
} else } else
wsc->device_password = strdup("00000000"); wsc->device_password = l_strdup("00000000");
if (!load_hexencoded(settings, "E-SNonce1", wsc->e_snonce1, 16)) if (!load_hexencoded(settings, "E-SNonce1", wsc->e_snonce1, 16))
l_getrandom(wsc->e_snonce1, 16); l_getrandom(wsc->e_snonce1, 16);

View File

@ -24,9 +24,10 @@
#include <config.h> #include <config.h>
#endif #endif
#include <string.h> #define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <string.h>
#include <ell/ell.h> #include <ell/ell.h>
#include "eap.h" #include "eap.h"

View File

@ -25,6 +25,7 @@
#endif #endif
#include <string.h> #include <string.h>
#include <alloca.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <ell/ell.h> #include <ell/ell.h>

View File

@ -73,7 +73,7 @@ void __handshake_set_install_igtk_func(handshake_install_igtk_func_t func)
void handshake_state_free(struct handshake_state *s) void handshake_state_free(struct handshake_state *s)
{ {
typeof(s->free) destroy = s->free; __typeof__(s->free) destroy = s->free;
l_free(s->authenticator_ie); l_free(s->authenticator_ie);
l_free(s->supplicant_ie); l_free(s->supplicant_ie);

View File

@ -25,6 +25,7 @@
#endif #endif
#include <stdlib.h> #include <stdlib.h>
#include <alloca.h>
#include <stdio.h> #include <stdio.h>
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#include <net/if_arp.h> #include <net/if_arp.h>

View File

@ -25,9 +25,10 @@
#endif #endif
#include <sys/types.h> #include <sys/types.h>
#include <stdio.h>
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <alloca.h>
#include <ell/ell.h> #include <ell/ell.h>
@ -1187,7 +1188,7 @@ bool network_register(struct network *network, const char *path)
l_info("Unable to register %s interface", l_info("Unable to register %s interface",
L_DBUS_INTERFACE_PROPERTIES); L_DBUS_INTERFACE_PROPERTIES);
network->object_path = strdup(path); network->object_path = l_strdup(path);
return true; return true;
} }

View File

@ -24,9 +24,11 @@
#include <config.h> #include <config.h>
#endif #endif
#define _GNU_SOURCE
#include <stdlib.h> #include <stdlib.h>
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <time.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <limits.h> #include <limits.h>
#include <linux/if.h> #include <linux/if.h>

View File

@ -24,9 +24,11 @@
#include <config.h> #include <config.h>
#endif #endif
#define _GNU_SOURCE
#include <stdio.h> #include <stdio.h>
#include <errno.h> #include <errno.h>
#include <time.h> #include <time.h>
#include <sys/time.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <ell/ell.h> #include <ell/ell.h>

View File

@ -25,16 +25,18 @@
#endif #endif
#define _GNU_SOURCE #define _GNU_SOURCE
#include <string.h>
#include <stdarg.h>
#include <stdio.h> #include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h> #include <errno.h>
#include <ctype.h> #include <ctype.h>
#include <fcntl.h>
#include <string.h>
#include <stdarg.h>
#include <stdlib.h>
#include <unistd.h>
#include <time.h>
#include <sys/time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <ell/ell.h> #include <ell/ell.h>

View File

@ -20,6 +20,8 @@
* *
*/ */
#include <time.h>
struct l_settings; struct l_settings;
enum security; enum security;

View File

@ -29,7 +29,7 @@
#define align_len(len, boundary) (((len)+(boundary)-1) & ~((boundary)-1)) #define align_len(len, boundary) (((len)+(boundary)-1) & ~((boundary)-1))
#define container_of(ptr, type, member) ({ \ #define container_of(ptr, type, member) ({ \
const typeof( ((type *)0)->member ) *__mptr = (ptr); \ const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );}) (type *)( (char *)__mptr - offsetof(type,member) );})
#define MAC "%02x:%02x:%02x:%02x:%02x:%02x" #define MAC "%02x:%02x:%02x:%02x:%02x:%02x"

View File

@ -28,6 +28,8 @@
#include <stdlib.h> #include <stdlib.h>
#include <getopt.h> #include <getopt.h>
#include <signal.h> #include <signal.h>
#include <time.h>
#include <sys/time.h>
#include <linux/if_ether.h> #include <linux/if_ether.h>
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#include <net/if_arp.h> #include <net/if_arp.h>