diff options
author | Martin Pärtel <martin.partel@gmail.com> | 2023-07-15 16:46:06 +0300 |
---|---|---|
committer | Martin Pärtel <martin.partel@gmail.com> | 2023-07-15 16:46:10 +0300 |
commit | a69ed90fb80e34b0faab29b1779dc403de783c59 (patch) | |
tree | 2c81bac449078c24663f1ff78358fa4a398b5b51 | |
parent | de593c62ff48170f8b3cd13aab895d1abe21d5b5 (diff) | |
download | bindfs-a69ed90fb80e34b0faab29b1779dc403de783c59.tar.gz |
Use MacOS socket file code on FreeBSD too.
-rw-r--r-- | src/bindfs.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bindfs.c b/src/bindfs.c index 40fe960..3ef8bf7 100644 --- a/src/bindfs.c +++ b/src/bindfs.c @@ -91,11 +91,15 @@ #include "userinfo.h" #include "usermap.h" +/* Socket file support for MacOS and FreeBSD */ +#if defined(__APPLE__) || defined(__FreeBSD__) +#include <sys/socket.h> +#include <sys/un.h> +#endif + /* Apple Structs */ #ifdef __APPLE__ #include <sys/param.h> -#include <sys/socket.h> -#include <sys/un.h> #define G_PREFIX "org" #define G_KAUTH_FILESEC_XATTR G_PREFIX ".apple.system.Security" #define A_PREFIX "com" @@ -908,7 +912,7 @@ static int bindfs_mknod(const char *path, mode_t mode, dev_t rdev) if (S_ISFIFO(mode)) { res = mkfifo(real_path, mode); -#ifdef __APPLE__ +#if defined(__APPLE__) || defined(__FreeBSD__) } else if (S_ISSOCK(mode)) { struct sockaddr_un su; int fd; |