]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: quic: fix build errors on FreeBSD since recent GSO changes
authorWilly Tarreau <w@1wt.eu>
Fri, 30 Aug 2024 16:52:33 +0000 (18:52 +0200)
committerWilly Tarreau <w@1wt.eu>
Fri, 30 Aug 2024 16:53:49 +0000 (18:53 +0200)
The following commits broke the build on FreeBSD when QUIC is enabled:

  35470d518 ("MINOR: quic: activate UDP GSO for QUIC if supported")
  448d3d388 ("MINOR: quic: add GSO parameter on quic_sock send API")

Indeed, it turns out that netinet/udp.h requires sys/types.h to be
included before. Let's just change the includes order to fix the build.
No backport is needed.

src/cfgparse-quic.c
src/quic_sock.c

index 7924281badcf2e154a905bb2359ade2c90a72c8a..fe4e35682576f4fc63521118a7940ee89a6ea34b 100644 (file)
@@ -1,5 +1,7 @@
 #include <errno.h>
 #include <string.h>
+
+#include <sys/types.h>
 #include <netinet/in.h>
 #include <netinet/udp.h>
 
index a894396497fc012500835cd4463ea0ff99e593a3..327deb492fcd9364fd7c329d684960c47d623f93 100644 (file)
 #include <stdlib.h>
 #include <string.h>
 
-#include <netinet/in.h>
-#include <netinet/udp.h>
 #include <sys/socket.h>
 #include <sys/types.h>
+#include <netinet/in.h>
+#include <netinet/udp.h>
 
 #include <haproxy/api.h>
 #include <haproxy/buf.h>