refactor: Remove FreeBSD-specific workaround
What changed, and why it matters
This is a cleanup change that removes a temporary compatibility fix for newer FreeBSD versions. The workaround was only needed because of a bug in FreeBSD's system headers, and that bug has now been fixed in supported FreeBSD releases. There is no security issue in the change itself.
No security action needed. Reviewers may want to confirm that the minimum supported FreeBSD version for the project no longer requires the workaround.
Security signals we found
No strong security signals were identified.
Evidence from the diff
The commit removes a FreeBSD-specific preprocessor workaround in src/common/netif.cpp. The workaround redefined typeof to __typeof to avoid a header conflict in FreeBSD’s netlink headers. Since the upstream FreeBSD bug has been fixed in supported 14.x and 15.x branches, the workaround is no longer needed. The change is purely a build-system/refactoring cleanup and does not alter runtime behavior on supported systems.
Changed components
src/common/netif.cppInspect captured patch +0 / −2
diff --git a/src/common/netif.cpp b/src/common/netif.cpp
index af69b8d1..489ed900 100644
--- a/src/common/netif.cpp
+++ b/src/common/netif.cpp
@@ -17,8 +17,6 @@
#elif defined(__FreeBSD__)
#include <osreldate.h>
#if __FreeBSD_version >= 1400000
-// Workaround https://github.com/freebsd/freebsd-src/pull/1070.
-#define typeof __typeof
#include <netlink/netlink.h>
#include <netlink/netlink_route.h>
#endif
Why this scored 15/100
Community notes
Notes can correct, qualify, or add evidence to the AI analysis. Every note shown here has been validated by a human moderator.
The AI analysis stands alone for now. Submit a note if you can add evidence or important context.