#ifndef COMPAT_H #define COMPAT_H #define pthread_mutex_t int #define PTHREAD_MUTEX_INITIALIZER 0 #define pthread_attr_init(attr) #define pthread_attr_destroy(attr) #define pthread_attr_setdetachstate(attr,state) #define pthread_attr_setschedpolicy(attr,policy) #define pthread_mutex_init(mutex,attr) #define pthread_mutex_lock(mutex) #define pthread_mutex_unlock(mutex) #define pthread_rwlock_init(lock,attr) #define pthread_rwlock_destroy(lock) #define pthread_rwlock_rdlock(lock) #define pthread_rwlock_wrlock(lock) #define pthread_rwlock_unlock(lock) /* pthread_create(thread,attr,start_routine,arg) not ignorable */ #ifndef HAVE_POLL struct pollfd { int fd; short events; short revents; }; #define POLLIN 0x0001 #define POLLNORM POLLIN #define POLLPRI POLLIN #define POLLOUT 0x0008 #define POLLERR 0x0010 #define POLLHUP 0x0020 #define POLLNVAL 0x0040 #define POLLRDNORM POLLIN #define POLLRDBAND POLLIN #define POLLWRNORM POLLOUT #define POLLWRBAND POLLOUT #define POLLMSG 0x0800 #define __INVALIDPOLL ~(POLLIN | POLLOUT) #endif /* HAVE_POLL */ #endif /* COMPAT_H */