Mercurial > hg > freeDiameter
diff include/freeDiameter/libfdproto.h @ 836:da97a5aa7976
Add replacement for clock_gettime (for Mac OS) -- ticket #38
author | Sebastien Decugis <sdecugis@freediameter.net> |
---|---|
date | Wed, 10 Oct 2012 13:34:30 +0200 |
parents | 85b3d7c8bf60 |
children | d7f940afd933 |
line wrap: on
line diff
--- a/include/freeDiameter/libfdproto.h Sat Sep 29 14:35:03 2012 +0200 +++ b/include/freeDiameter/libfdproto.h Wed Oct 10 13:34:30 2012 +0200 @@ -603,6 +603,17 @@ /*============================================================*/ +/* PORTABILITY */ +/*============================================================*/ +#ifndef HAVE_CLOCK_GETTIME + #define CLOCK_REALTIME 0 + #include <sys/time.h> + int clock_gettime(int clk_id, struct timespec* ts); +#endif /* HAVE_CLOCK_GETTIME */ + + + +/*============================================================*/ /* BINARY STRINGS */ /*============================================================*/