tools/preload: include correct extended attribute headers on FreeBSD (#1590)
Some checks are pending
mkdocs / deploy (push) Waiting to run

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 19:09:41 +01:00 • committed by GitHub
parent 4c5473d569
commit caf7915003
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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];