From 2e561a634ae3e747b293a4e05eaf44726968dc1a Mon Sep 17 00:00:00 2001 From: dimitri staessens Date: Thu, 8 Sep 2016 10:26:04 +0200 Subject: lib: Fix shm for evil devices Cupertino's finest don't seem to support a write call with a filedescriptor that points to a shared memory file. ENOTSUP is not mentioned in their manpage either. Classic. --- src/lib/shm_rdrbuff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lib/shm_rdrbuff.c') 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, -- cgit v1.2.3