summaryrefslogtreecommitdiff
path: root/src/ipcpd/ipcp.c
diff options
context:
space:
mode:
authordimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-30 14:29:08 +0200
committerdimitri staessens <dimitri.staessens@intec.ugent.be>2016-08-30 21:44:34 +0200
commit04eb03136466a18d81511e7ccadf51c08faa8edb (patch)
tree721c6c6a7b394dc758ffa12bb3a1261d9817207f /src/ipcpd/ipcp.c
parent2cc89f6da424ab503af563e0cc92dda43b8f8432 (diff)
downloadouroboros-04eb03136466a18d81511e7ccadf51c08faa8edb.tar.gz
ouroboros-04eb03136466a18d81511e7ccadf51c08faa8edb.zip
lib, ipcp: Compile on Apple junk
Disables robust mutexes and clock attributes for condition variables for compatibility with OSX (SUSv2). Implements clock_gettime and adds some defines for OSX compatibility in time_utils.
Diffstat (limited to 'src/ipcpd/ipcp.c')
-rw-r--r--src/ipcpd/ipcp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/ipcpd/ipcp.c b/src/ipcpd/ipcp.c
index 87bf9e51..12111a51 100644
--- a/src/ipcpd/ipcp.c
+++ b/src/ipcpd/ipcp.c
@@ -48,7 +48,9 @@ struct ipcp * ipcp_instance_create()
pthread_rwlock_init(&i->state_lock, NULL);
pthread_mutex_init(&i->state_mtx, NULL);
pthread_condattr_init(&cattr);
+#ifndef __APPLE__
pthread_condattr_setclock(&cattr, PTHREAD_COND_CLOCK);
+#endif
pthread_cond_init(&i->state_cond, &cattr);
return i;