Merge remote-tracking branch 'origin/master'
[unleashed/lotheac.git] / usr / src / lib / libresolv2 / common / bsd / setitimer.c
blobd336ac80d9328a06e1c2d965b1933fafc9cf4731
1 #include "port_before.h"
3 #include <sys/time.h>
5 #include "port_after.h"
7 /*%
8 * Setitimer emulation routine.
9 */
10 #ifndef NEED_SETITIMER
11 int __bindcompat_setitimer;
12 #else
14 int
15 __setitimer(int which, const struct itimerval *value,
16 struct itimerval *ovalue)
18 if (alarm(value->it_value.tv_sec) >= 0)
19 return (0);
20 else
21 return (-1);
23 #endif
25 /*! \file */