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)
committerVilbrekin <vilbrekin@gmail.com>
Sat, 25 Aug 2012 18:01:11 +0000 (20:01 +0200)
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 */