]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tcp: Fixed includes for FreeBSD.
authormacrule <562520+macrule@users.noreply.github.com>
Wed, 29 Nov 2017 17:18:53 +0000 (18:18 +0100)
committerJaroslav Kysela <perex@perex.cz>
Wed, 29 Nov 2017 19:55:06 +0000 (20:55 +0100)
sys/socket.h is required.

Switched include order for netinet/in.h and netinet/ip.h to avoid compiler errors on FreeBSD.

src/tcp.c
src/tcp.h

index 31341c28d322ab606c8f067ad6fe482627fc2bb2..5bd214940edf464a9d15b51f27ef96f45037acdb 100644 (file)
--- a/src/tcp.c
+++ b/src/tcp.c
@@ -30,8 +30,8 @@
 #include <fcntl.h>
 #include <errno.h>
 #include <signal.h>
-#include <netinet/ip.h>
 #include <netinet/in.h>
+#include <netinet/ip.h>
 #include <netinet/tcp.h>
 #include <arpa/inet.h>
 #include <sys/types.h>
index 1c786d0cb86ff3262b367f31428d9baa9aa4a4db..ad6ef018f2091e93dc873b2c9315e18f8381dc60 100644 (file)
--- a/src/tcp.h
+++ b/src/tcp.h
 #include "htsbuf.h"
 #include "htsmsg.h"
 
+#if defined(PLATFORM_FREEBSD)
+#include <sys/socket.h>
+#endif
+
 #define IP_AS_V4(storage, f) ((struct sockaddr_in *)&(storage))->sin_##f
 #define IP_AS_V6(storage, f) ((struct sockaddr_in6 *)&(storage))->sin6_##f
 #define IP_IN_ADDR(storage) \