From dcf6499abce9b0acf5a7e1467f1a08f4d6ce3631 Mon Sep 17 00:00:00 2001 From: David Carlier Date: Wed, 7 Sep 2022 16:01:44 +0100 Subject: [PATCH] Fix GH-9493: fix ancillary data build for FreeBSD prior to the 13 release. 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. --- ext/sockets/conversions.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ext/sockets/conversions.h b/ext/sockets/conversions.h index 41c22135cea76..1f1fd29c5c05c 100644 --- a/ext/sockets/conversions.h +++ b/ext/sockets/conversions.h @@ -8,6 +8,13 @@ # include # if defined(__FreeBSD__) || defined(__NetBSD__) # include +# if defined(__FreeBSD__) + // we can't fully implement the ancillary data feature with + // the legacy sockcred/LOCAL_CREDS pair (due to lack of process + // id handling), so we disable it since only the + // sockcred2/LOCAL_CREDS_PERSISTENT pair can address it. +# undef LOCAL_CREDS +# endif # endif #else # include