summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README11
-rw-r--r--libvncclient/listen.c2
-rw-r--r--rfb/rfbclient.h5
3 files changed, 17 insertions, 1 deletions
diff --git a/README b/README
index 5a69f3e..6227069 100644
--- a/README
+++ b/README
@@ -81,6 +81,17 @@ LibVNCServer uses CMake, so you can build via:
For some more comprehensive examples that include installation of dependencies, see
the [Unix CI](.travis.yml) and [Windows CI](.appveyor.yml) build setups.
+Crosscompiling involves some more advanced command line switches but is easily possible
+as well.
+
+For instance, building for Android (see https://developer.android.com/ndk/guides/cmake.html as a reference):
+
+ mkdir build
+ cd build
+ cmake .. -DANDROID_NDK=<path> -DCMAKE_TOOLCHAIN_FILE=<path> -DANDROID_NATIVE_API_LEVEL=<API level you want> -DWITH_PNG=OFF # NDK not shipping png per default
+ cmake --build .
+
+
How to use
----------
diff --git a/libvncclient/listen.c b/libvncclient/listen.c
index 8674b3f..4ecedff 100644
--- a/libvncclient/listen.c
+++ b/libvncclient/listen.c
@@ -89,7 +89,7 @@ listenForIncomingConnections(rfbClient* client)
int r;
/* reap any zombies */
int status, pid;
- while ((pid= wait3(&status, WNOHANG, (struct rusage *)0))>0);
+ while ((pid= wait4(-1, &status, WNOHANG, (struct rusage *)0))>0);
/* TODO: callback for discard any events (like X11 events) */
diff --git a/rfb/rfbclient.h b/rfb/rfbclient.h
index 505dd9c..72e7a5a 100644
--- a/rfb/rfbclient.h
+++ b/rfb/rfbclient.h
@@ -35,6 +35,11 @@
#define WIN32_LEAN_AND_MEAN /* Prevent loading any Winsock 1.x headers from windows.h */
#endif
+#if defined(ANDROID) || defined(LIBVNCSERVER_HAVE_ANDROID)
+#include <arpa/inet.h>
+#include <sys/select.h>
+#endif
+
#include <stdio.h>
#include <stdlib.h>
#include <string.h>