#ifdef CONFIG_DARWIN
#include <unistd.h>
+#include <stdio.h>
/* In Darwin, sem_init() is unfortunately not implemented and the guide
* recommends emulating it using sem_open(). */
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);