From 48639a6e1b2bdb8e26fdad40e08717799a7202ad Mon Sep 17 00:00:00 2001
From: Alexander Miroshnichenko <a.miroshnichenko@rbk.money>
Date: Sat, 16 Jan 2021 11:54:32 +0300
Subject: [PATCH] POSIX support for duktape JS backend
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit

Signed-off-by: Alexander Miroshnichenko <a.miroshnichenko@rbk.money>
---
 src/polkitbackend/polkitbackendduktapeauthority.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/polkitbackend/polkitbackendduktapeauthority.c b/src/polkitbackend/polkitbackendduktapeauthority.c
index ae984535ed88..b5b73bfea0d1 100644
--- a/src/polkitbackend/polkitbackendduktapeauthority.c
+++ b/src/polkitbackend/polkitbackendduktapeauthority.c
@@ -1013,6 +1013,7 @@ js_polkit_user_is_in_netgroup (duk_context *cx)
   user = duk_require_string (cx, 0);
   netgroup = duk_require_string (cx, 1);
 
+#if defined HAVE_INNETGR
   if (innetgr (netgroup,
                NULL,  /* host */
                user,
@@ -1020,6 +1021,7 @@ js_polkit_user_is_in_netgroup (duk_context *cx)
     {
       is_in_netgroup = TRUE;
     }
+#endif
 
   duk_push_boolean (cx, is_in_netgroup);
   return 1;
-- 
2.26.2

