17c478bd9Sstevel@tonic-gate #include "port_before.h"
27c478bd9Sstevel@tonic-gate 
37c478bd9Sstevel@tonic-gate #include <sys/time.h>
47c478bd9Sstevel@tonic-gate 
57c478bd9Sstevel@tonic-gate #include "port_after.h"
67c478bd9Sstevel@tonic-gate 
7*9525b14bSRao Shoaib /*%
87c478bd9Sstevel@tonic-gate  * Setitimer emulation routine.
97c478bd9Sstevel@tonic-gate  */
107c478bd9Sstevel@tonic-gate #ifndef NEED_SETITIMER
117c478bd9Sstevel@tonic-gate int __bindcompat_setitimer;
127c478bd9Sstevel@tonic-gate #else
137c478bd9Sstevel@tonic-gate 
147c478bd9Sstevel@tonic-gate int
__setitimer(int which,const struct itimerval * value,struct itimerval * ovalue)157c478bd9Sstevel@tonic-gate __setitimer(int which, const struct itimerval *value,
167c478bd9Sstevel@tonic-gate 	    struct itimerval *ovalue)
177c478bd9Sstevel@tonic-gate {
187c478bd9Sstevel@tonic-gate 	if (alarm(value->it_value.tv_sec) >= 0)
197c478bd9Sstevel@tonic-gate 		return (0);
207c478bd9Sstevel@tonic-gate 	else
217c478bd9Sstevel@tonic-gate 		return (-1);
227c478bd9Sstevel@tonic-gate }
237c478bd9Sstevel@tonic-gate #endif
24*9525b14bSRao Shoaib 
25*9525b14bSRao Shoaib /*! \file */
26