Browse Source

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.
pull/1591/head
Emanuel Haupt 6 days ago
committed by GitHub
parent
commit
caf7915003
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 4
      tools/preload.c

4
tools/preload.c

@ -33,7 +33,11 @@
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#ifdef __FreeBSD__
#include <sys/extattr.h>
#else
#include <sys/xattr.h> #include <sys/xattr.h>
#endif
#include <unistd.h> #include <unistd.h>
typedef char IOCTL_BUF[4096]; typedef char IOCTL_BUF[4096];

Loading…
Cancel
Save