Skip to content

Commit 4f27595

Browse files
authored
Fix GH-9493: fix ancillary data build for FreeBSD prior to the 13 release. (#9496)
the legacy sockcred struct does not hold the process id, thus sockcred2 had been added from FreeBSD 13 in conjunction with LOCAL_CREDS_PERSISTENT to address this thus we disable the feature for earlier releases.
1 parent ce05827 commit 4f27595

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/sockets/conversions.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@
88
# include <sys/socket.h>
99
# if defined(__FreeBSD__) || defined(__NetBSD__)
1010
# include <sys/un.h>
11+
# if defined(__FreeBSD__)
12+
// we can't fully implement the ancillary data feature with
13+
// the legacy sockcred/LOCAL_CREDS pair (due to lack of process
14+
// id handling), so we disable it since only the
15+
// sockcred2/LOCAL_CREDS_PERSISTENT pair can address it.
16+
# undef LOCAL_CREDS
17+
# endif
1118
# endif
1219
#else
1320
# include <Ws2tcpip.h>

0 commit comments

Comments
 (0)