summaryrefslogtreecommitdiff
path: root/src/irmd/main.c
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2026-02-12 14:54:23 +0100
committerSander Vrijders <sander@ouroboros.rocks>2026-02-13 09:22:29 +0100
commit86dba5441c686d037c493e5b498e27249aa6bd9d (patch)
treed0916720c68b193b8a8e5bae7dce5de55121f081 /src/irmd/main.c
parent4c73ee20024e1d1272a979574438749cfcd61426 (diff)
downloadouroboros-86dba5441c686d037c493e5b498e27249aa6bd9d.tar.gz
ouroboros-86dba5441c686d037c493e5b498e27249aa6bd9d.zip
lib: Fix SSM PUP creation on OS Xbe
OS X doesn't support chmod on shm files after creation. Since we already set the mode at creation, that call was redundant. Fixed the getpeereid() function was not accessible because of the guards. Fixed some differences between macOS and Linux with gid_t vs int usage. Signed-off-by: Dimitri Staessens <dimitri@ouroboros.rocks> Signed-off-by: Sander Vrijders <sander@ouroboros.rocks>
Diffstat (limited to 'src/irmd/main.c')
-rw-r--r--src/irmd/main.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/irmd/main.c b/src/irmd/main.c
index ccb16017..196c4b11 100644
--- a/src/irmd/main.c
+++ b/src/irmd/main.c
@@ -24,7 +24,8 @@
#define _DEFAULT_SOURCE
#define _GNU_SOURCE
#else
-#define _POSIX_C_SOURCE 200809L
+#define _DEFAULT_SOURCE
+#define _BSD_SOURCE
#endif
#include "config.h"
@@ -60,15 +61,19 @@
#include <dirent.h>
#include <grp.h>
#include <pwd.h>
-#include <sys/socket.h>
-#include <sys/un.h>
#include <signal.h>
+#include <spawn.h>
#include <stdlib.h>
#include <string.h>
#include <limits.h>
+#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/wait.h>
-#include <spawn.h>
+#include <sys/un.h>
+#ifdef __APPLE__
+#include <sys/types.h>
+#include <unistd.h>
+#endif
#ifdef HAVE_LIBGCRYPT
#include <gcrypt.h>