mirror of
https://git.kernel.org/pub/scm/network/wireless/iwd.git
synced 2026-02-11 06:58:04 +01:00
netconfig: Fix build issue with missing _GNU_SOURCE
CC src/netconfig.o
src/netconfig.c: In function ‘netconfig_load_settings’:
src/netconfig.c:290:23: error: ‘HOST_NAME_MAX’ undeclared (first use in this function); did you mean ‘XATTR_NAME_MAX’?
290 | char hostname[HOST_NAME_MAX + 1];
| ^~~~~~~~~~~~~
| XATTR_NAME_MAX
src/netconfig.c:290:23: note: each undeclared identifier is reported only once for each function it appears in
src/netconfig.c:388:30: error: implicit declaration of function ‘gethostname’; did you mean ‘getsockname’? [-Wimplicit-function-declaration]
388 | if (send_hostname && gethostname(hostname, sizeof(hostname)) != 0) {
| ^~~~~~~~~~~
| getsockname
src/netconfig.c:290:14: error: unused variable ‘hostname’ [-Werror=unused-variable]
290 | char hostname[HOST_NAME_MAX + 1];
| ^~~~~~~~
This commit is contained in:
parent
30049f5822
commit
88d2718b50
@ -24,6 +24,7 @@
|
||||
#include <config.h>
|
||||
#endif
|
||||
|
||||
#define _GNU_SOURCE
|
||||
#include <errno.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <net/if_arp.h>
|
||||
@ -31,6 +32,7 @@
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#include <fcntl.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <unistd.h>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user