mirror of
https://github.com/mirror/wget.git
synced 2025-01-27 21:00:31 +08:00
* src/xattr.h: Fix #define fsetxattr for MacOS and FreeBSD
Reported-by: Zhiming Wang
This commit is contained in:
parent
58546e52e2
commit
f2c4289557
@ -30,14 +30,14 @@ int set_file_metadata (const char *origin_url, const char *referrer_url, FILE *f
|
||||
#elif defined(__APPLE__)
|
||||
/* libc on OS/X has fsetxattr (6 arguments). */
|
||||
# include <sys/xattr.h>
|
||||
# define fsetxattr (file, name, buffer, size, flags) \
|
||||
# define fsetxattr(file, name, buffer, size, flags) \
|
||||
fsetxattr ((file), (name), (buffer), (size), 0, (flags))
|
||||
# define USE_XATTR
|
||||
#elif defined(__FreeBSD_version) && (__FreeBSD_version > 500000)
|
||||
/* FreeBSD */
|
||||
# include <sys/types.h>
|
||||
# include <sys/extattr.h>
|
||||
# define fsetxattr (file, name, buffer, size, flags) \
|
||||
# define fsetxattr(file, name, buffer, size, flags) \
|
||||
extattr_set_fd ((file), EXTATTR_NAMESPACE_USER, (name), (buffer), (size))
|
||||
# define USE_XATTR
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user