tests: On Unix, include <netinet/in.h> for IPPROTO_TCP
authorSimon McVittie <smcv@collabora.com>
Wed, 1 Jul 2020 15:01:38 +0000 (15:01 +0000)
committerSimon McVittie <smcv@collabora.com>
Fri, 14 Aug 2020 16:03:51 +0000 (16:03 +0000)
Otherwise, dbus doesn't compile on FreeBSD if the GLib-based tests
are enabled (which suggests that no FreeBSD user has run those tests
successfully).

We already include <netinet/in.h> in other places with no conditions
or checks other than "is Unix", so apparently it's portable enough that
specifically testing for its presence is not necessary. POSIX requires it
to exist.

Signed-off-by: Simon McVittie <smcv@collabora.com>
(cherry picked from commit f0e526bca8a5e47246c97199f5c388b0bd00d9f3)

test/test-utils-glib.c

index 28a3684..09e226b 100644 (file)
@@ -35,6 +35,7 @@
 # include <windows.h>
 #else
 # include <netdb.h>
+# include <netinet/in.h>
 # include <signal.h>
 # include <unistd.h>
 # include <sys/socket.h>