]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: include: add sys/types before netinet/tcp.h
authorWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 09:22:44 +0000 (11:22 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 09:22:44 +0000 (11:22 +0200)
Apparently Cygwin requires sys/types.h before netinet/tcp.h but doesn't
include it by itself, as shown here:
  https://github.com/haproxy/haproxy/actions/runs/131943890

This patch makes sure it's always present, which is in server.c and
the SPOA example.

contrib/spoa_example/spoa.c
src/server.c

index dd4a87338ba8edd44bbea0b7d892482b379889e4..9725078154bdea161a09f27f297dcfa3555b6896 100644 (file)
@@ -22,6 +22,7 @@
 #include <stdio.h>
 #include <signal.h>
 #include <arpa/inet.h>
+#include <sys/types.h>
 #include <netinet/in.h>
 #include <netinet/tcp.h>
 #include <sys/socket.h>
index 442756985bfd4131f0aa156dd7390f8ab082a3b6..1fd29046e841f418bc2ee2c98dd6e087d5a667af 100644 (file)
@@ -11,6 +11,7 @@
  *
  */
 
+#include <sys/types.h>
 #include <netinet/tcp.h>
 #include <ctype.h>
 #include <errno.h>