summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/lockfile.c4
-rw-r--r--src/lib/shm_ap_rbuff.c4
-rw-r--r--src/lib/shm_rdrbuff.c4
3 files changed, 6 insertions, 6 deletions
diff --git a/src/lib/lockfile.c b/src/lib/lockfile.c
index 81bed687..04ce9324 100644
--- a/src/lib/lockfile.c
+++ b/src/lib/lockfile.c
@@ -64,13 +64,13 @@ struct lockfile * lockfile_create() {
free(lf);
return NULL;
}
-
+#ifndef __APPLE__
if (write(lf->fd, "", 1) != 1) {
LOG_DBGF("Failed to finalise lockfile.");
free(lf);
return NULL;
}
-
+#endif
lf->api = mmap(NULL,
LF_SIZE, PROT_READ | PROT_WRITE,
MAP_SHARED,
diff --git a/src/lib/shm_ap_rbuff.c b/src/lib/shm_ap_rbuff.c
index 473894d5..d9e332fe 100644
--- a/src/lib/shm_ap_rbuff.c
+++ b/src/lib/shm_ap_rbuff.c
@@ -104,13 +104,13 @@ static struct shm_ap_rbuff * shm_ap_rbuff_create(bool dir)
free(rb);
return NULL;
}
-
+#ifndef __APPLE__
if (write(shm_fd, "", 1) != 1) {
LOG_DBG("Failed to finalise extension of ringbuffer.");
free(rb);
return NULL;
}
-
+#endif
shm_base = mmap(NULL,
SHM_RBUFF_FILE_SIZE,
PROT_READ | PROT_WRITE,
diff --git a/src/lib/shm_rdrbuff.c b/src/lib/shm_rdrbuff.c
index 7c4927fc..bf5c7f16 100644
--- a/src/lib/shm_rdrbuff.c
+++ b/src/lib/shm_rdrbuff.c
@@ -190,14 +190,14 @@ struct shm_rdrbuff * shm_rdrbuff_create()
free(rdrb);
return NULL;
}
-
+#ifndef __APPLE
if (write(shm_fd, "", 1) != 1) {
LOG_DBGF("Failed to finalise extension of shared memory map.");
free(shm_rdrb_fn);
free(rdrb);
return NULL;
}
-
+#endif
shm_base = mmap(NULL,
SHM_FILE_SIZE,
PROT_READ | PROT_WRITE,