Added Android support

Signed-off-by: Mikko Koppanen <mkoppanen@php.net>
This commit is contained in:
Mikko Koppanen 2011-08-15 19:09:04 +02:00 committed by Martin Sustrik
parent 57440b86e2
commit 0354d4d37f
2 changed files with 9 additions and 0 deletions

View File

@ -90,6 +90,12 @@ case "${host_os}" in
fi
AC_DEFINE(ZMQ_HAVE_LINUX, 1, [Have Linux OS])
AC_CHECK_LIB(rt, sem_init)
case "${host_os}" in
*android*)
AC_DEFINE(ZMQ_HAVE_ANDROID, 1, [Have Android OS])
;;
esac
;;
*solaris*)
# Define on Solaris to enable all library features

View File

@ -352,6 +352,9 @@ int zmq_poll (zmq_pollitem_t *items_, int nitems_, long timeout_)
#if defined ZMQ_HAVE_WINDOWS
Sleep (timeout_ > 0 ? timeout_ : INFINITE);
return 0;
#elif defined ZMQ_HAVE_ANDROID
usleep (timeout_ * 1000);
return 0;
#else
return usleep (timeout_ * 1000);
#endif