From 88d2718b507c95ca8f78e85eabf4eba1ff4d2c29 Mon Sep 17 00:00:00 2001 From: Marcel Holtmann Date: Tue, 10 Feb 2026 09:19:56 +0100 Subject: [PATCH] netconfig: Fix build issue with missing _GNU_SOURCE MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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]; | ^~~~~~~~ --- src/netconfig.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/netconfig.c b/src/netconfig.c index cd19217c..4e62b1dc 100644 --- a/src/netconfig.c +++ b/src/netconfig.c @@ -24,6 +24,7 @@ #include #endif +#define _GNU_SOURCE #include #include #include @@ -31,6 +32,7 @@ #include #include #include +#include #include #include #include