diff options
| author | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-09-08 10:26:04 +0200 | 
|---|---|---|
| committer | dimitri staessens <dimitri.staessens@intec.ugent.be> | 2016-09-08 10:26:04 +0200 | 
| commit | 2e561a634ae3e747b293a4e05eaf44726968dc1a (patch) | |
| tree | 7bb1e6ab8131d1d679f5a5bb5e5953e4a60d3986 /src/lib/lockfile.c | |
| parent | b9793ab68aa321b0dac14d1dff5789edb95ad0bb (diff) | |
| download | ouroboros-2e561a634ae3e747b293a4e05eaf44726968dc1a.tar.gz ouroboros-2e561a634ae3e747b293a4e05eaf44726968dc1a.zip | |
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.
Diffstat (limited to 'src/lib/lockfile.c')
| -rw-r--r-- | src/lib/lockfile.c | 4 | 
1 files changed, 2 insertions, 2 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, | 
