From 0f7227c30ef6b3b1320575adaf8d63f9cd213e41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ladan?= Date: Sun, 4 Aug 2024 21:35:04 +0200 Subject: [PATCH 1/2] fix(build): fix build on FreeBSD --- internal/netxlite/getaddrinfo_cgo.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/netxlite/getaddrinfo_cgo.go b/internal/netxlite/getaddrinfo_cgo.go index 8e6f0416fc..d77b5328b6 100644 --- a/internal/netxlite/getaddrinfo_cgo.go +++ b/internal/netxlite/getaddrinfo_cgo.go @@ -9,6 +9,9 @@ package netxlite #ifndef _WIN32 #include // for getaddrinfo +#ifdef __FreeBSD__ +#include // for C.SOCK_STREAM and C.AF_* +#endif #else #include // for getaddrinfo #endif From 8f0049740bbfc637f78c6f74536affe2ac6ebf21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Ladan?= Date: Sun, 1 Dec 2024 15:15:30 +0100 Subject: [PATCH 2/2] netxlite: include sys/socket.h on any non-Windows system Idea from bassosimone --- internal/netxlite/getaddrinfo_cgo.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/internal/netxlite/getaddrinfo_cgo.go b/internal/netxlite/getaddrinfo_cgo.go index d77b5328b6..fe7bd4301a 100644 --- a/internal/netxlite/getaddrinfo_cgo.go +++ b/internal/netxlite/getaddrinfo_cgo.go @@ -9,9 +9,7 @@ package netxlite #ifndef _WIN32 #include // for getaddrinfo -#ifdef __FreeBSD__ #include // for C.SOCK_STREAM and C.AF_* -#endif #else #include // for getaddrinfo #endif