tools/preload: include correct extended attribute headers on FreeBSD (#1590)

Add conditional includes for extended attribute support. FreeBSD uses
<sys/extattr.h> instead of <sys/xattr.h>, which prevents the preload
module from building. This update selects the proper header based on
the target platform and fixes the build failure on FreeBSD.
This commit is contained in:
Emanuel Haupt
2025-11-25 12:09:41 -06:00
committed by GitHub
parent 4c5473d569
commit caf7915003
+4
View File
@@ -33,7 +33,11 @@
#include <sys/ioctl.h>
#include <sys/stat.h>
#include <sys/types.h>
#ifdef __FreeBSD__
#include <sys/extattr.h>
#else
#include <sys/xattr.h>
#endif
#include <unistd.h>
typedef char IOCTL_BUF[4096];