X-Git-Url: http://mj.ucw.cz/gitweb/?a=blobdiff_plain;ds=inline;f=lib%2Fsemaphore.h;h=fa2e0ee473d58318e59bc3683d22eb33d94a8895;hb=ed4e86de76d1c3bfb685207fe00078950f67355a;hp=ad160b1fab07c9dce96745bacaf164d1550d75d7;hpb=0e72627fdb86b1204dd58ce42c8918701c7e2cf1;p=libucw.git diff --git a/lib/semaphore.h b/lib/semaphore.h index ad160b1f..fa2e0ee4 100644 --- a/lib/semaphore.h +++ b/lib/semaphore.h @@ -15,6 +15,7 @@ #ifdef CONFIG_DARWIN #include +#include /* In Darwin, sem_init() is unfortunately not implemented and the guide * recommends emulating it using sem_open(). */ @@ -23,7 +24,7 @@ static inline sem_t * sem_alloc(void) { static uns cnt = 0; - byte buf[20]; + char buf[20]; sprintf(buf, "tmp/sem-%d-%d", getpid(), cnt++); sem_t *sem = sem_open(buf, O_CREAT, 0777, 0); ASSERT(sem != (sem_t*) SEM_FAILED);