]> git.meshlink.io Git - meshlink/commitdiff
Use __ANDROID__ define rather than dirty hard-code to allow android NDK cross-compila...
authorVilbrekin <vilbrekin@gmail.com>
Sat, 25 Aug 2012 18:01:11 +0000 (20:01 +0200)
committerGuus Sliepen <guus@tinc-vpn.org>
Mon, 24 Sep 2012 11:55:29 +0000 (13:55 +0200)
src/tincd.c

index 7b74cd6ca7e97b6df7844e6b3dbeaa8f8b2f6ad5..566031a3ddeb170645e1a17736ae467fb023963e 100644 (file)
@@ -467,9 +467,11 @@ static bool drop_privs() {
                               "initgroups", strerror(errno));
                        return false;
                }
-        // Not supported in android NDK
-               //endgrent();
-               //endpwent();
+#ifndef __ANDROID__
+// Not supported in android NDK
+               endgrent();
+               endpwent();
+#endif
        }
        if (do_chroot) {
                tzset();        /* for proper timestamps in logs */