Use __ANDROID__ define rather than dirty hard-code to allow android NDK cross-compila...
[tinc] / src / tincd.c
index 7b74cd6..566031a 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 */