Commit e5975a5f authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Fix OS/X compilation for good.

Fixes	#1022
parent 652b2f61
......@@ -59,9 +59,32 @@
#include "stevedore.h"
#include "hash_slinger.h"
/*--------------------------------------------------------------------
* MAC OS/X is incredibly moronic when it comes to time and such...
*/
#ifndef CLOCK_MONOTONIC
#define CLOCK_MONOTONIC CLOCK_REALTIME /* OS/X is silly */
#endif
#define CLOCK_MONOTONIC 0
static int
clock_gettime(int foo, struct timespec *ts)
{
struct timeval tv;
gettimeofday(&tv, NULL);
ts->tv_sec = tv.tv_sec;
ts->tv_nsec = tv.tv_usec * 1000;
return (0);
}
static int
pthread_condattr_setclock(pthread_condattr_t *attr, int foo)
{
(void)attr;
(void)foo;
return (0);
}
#endif /* !CLOCK_MONOTONIC */
static void *waiter_priv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment