summaryrefslogtreecommitdiffstats
path: root/src/socket.c
diff options
context:
space:
mode:
authorRick Lei <ricklei@gmail.com>2015-01-14 15:11:43 +0100
committerRick Lei <ricklei@gmail.com>2015-01-14 15:11:43 +0100
commitc4378784ae2caec57634f9f04bcb3dcddc673f36 (patch)
tree70bbdb1c348803006a7cbf2092da65312720a386 /src/socket.c
parent133cee578e04e561bb17e37393bbf7e427522560 (diff)
downloadfastd-c4378784ae2caec57634f9f04bcb3dcddc673f36.tar
fastd-c4378784ae2caec57634f9f04bcb3dcddc673f36.zip
Add Android 4.1+ support. See doc/README-Android.md for build HOWTO.
* Update CMake files to work with android-cmake * Use unix domain socket for communicating with Android GUI * May also run standalone but requires rooted Android device
Diffstat (limited to 'src/socket.c')
-rw-r--r--src/socket.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/socket.c b/src/socket.c
index e72ec94..5e33010 100644
--- a/src/socket.c
+++ b/src/socket.c
@@ -152,6 +152,13 @@ static int bind_socket(const fastd_bind_address_t *addr, bool warn) {
goto error;
}
+#ifdef __ANDROID__
+ if (!fastd_android_protect_socket(fd)) {
+ pr_error("error protecting socket");
+ goto error;
+ }
+#endif
+
return fd;
error: