mirror of
https://github.com/rwinkhart/sys.git
synced 2026-10-28 20:28:18 -04:00
go.sys/unix: add support for *xattr functions on FreeBSD
Add wrappers that provide Linux-y behavior around the FreeBSD extattr(2) functions. This allows certain packages, like the fuse package to run under FreeBSD. LGTM=iant R=golang-codereviews, iant CC=golang-codereviews https://golang.org/cl/147850043
This commit is contained in:
1 parent
7f1554891e
commit
ac22431096
5 files changed
+941
No files matched your search
@@ -74,6 +74,7 @@ includes_FreeBSD='
|
||||
#include <termios.h>
|
||||
#include <netinet/ip.h>
|
||||
#include <netinet/ip_mroute.h>
|
||||
#include <sys/extattr.h>
|
||||
|
||||
#if __FreeBSD__ >= 10
|
||||
#define IFT_CARP 0xf8 // IFT_CARP is deprecated in FreeBSD 10
|
||||
@@ -244,6 +245,9 @@ ccflags="$@"
|
||||
$2 ~ /^(SCM_SRCRT)$/ {next}
|
||||
$2 ~ /^(MAP_FAILED)$/ {next}
|
||||
|
||||
$2 ~ /^EXTATTR_NAMESPACE_NAMES/ ||
|
||||
$2 ~ /^EXTATTR_NAMESPACE_[A-Z]+_STRING/ {next}
|
||||
|
||||
$2 !~ /^ETH_/ &&
|
||||
$2 !~ /^EPROC_/ &&
|
||||
$2 !~ /^EQUIV_/ &&
|
||||
|
||||
Reference in new issue
Block a user