diff options
-rw-r--r-- | configure.in | 6 | ||||
-rw-r--r-- | src/zmq.cpp | 3 |
2 files changed, 9 insertions, 0 deletions
diff --git a/configure.in b/configure.in index 3fda5f0..e6da48d 100644 --- a/configure.in +++ b/configure.in @@ -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 diff --git a/src/zmq.cpp b/src/zmq.cpp index 1ea08f8..0f54fab 100644 --- a/src/zmq.cpp +++ b/src/zmq.cpp @@ -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 |