]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
nss: Add missing includes for gai_strerror()
authorMichal Privoznik <mprivozn@redhat.com>
Thu, 22 May 2025 07:17:16 +0000 (09:17 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Thu, 22 May 2025 13:44:12 +0000 (15:44 +0200)
There are two places where gai_strerror() is called but neither
of them includes all necessary header files as documented in its
manpage. Fortunately, both calls occur in ERROR() macro which by
default does nothing - hence we don't see any compilation errors.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
tools/nss/libvirt_nss.c
tools/nss/libvirt_nss_leases.c

index 69bf59850e12ebaa31313707950bb03c21cc408b..25e2ec06420b752536e0ff45a556e153333c39d7 100644 (file)
@@ -35,6 +35,8 @@
 #include <errno.h>
 #include <string.h>
 #include <time.h>
+#include <sys/socket.h>
+#include <netdb.h>
 
 
 #if defined(WITH_BSD_NSS)
index 4d68787fb2b18483ab92f87ed20248294ffa1b9a..6624df2928500cb197e416dc3bd8914f24889a2a 100644 (file)
@@ -25,6 +25,9 @@
 #include <stdlib.h>
 #include <stdbool.h>
 #include <fcntl.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
 
 #include <json.h>