Use __ANDROID__ define rather than dirty hard-code to allow android NDK cross-compila...
[oweals/tinc.git] / 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 */