I use nanosleep under solaris10,like follows:
#include <pthread.h>
#include <time.h>
#include <sys/time.h>
struct to_info{
void (*to_fn)(void *);
void *to_arg;
struct timespec to_wait;
};
void *timeout_helper(void *arg){
struct to_info *tip;
nanosleep(&tip->to_wait,NULL);
}
when I compile above,it raise following error:
undefined:nanosleep
Why? Which header file include nanosleep function? How to find this header file?
thanks