From 4d0b776d6c2c44c1cfe0bcc6a9f6dc494fa8dca4 Mon Sep 17 00:00:00 2001 From: Juan RP Date: Fri, 8 May 2015 10:28:25 +0200 Subject: [PATCH] polkit: try to unbreak musl build (take 2). --- srcpkgs/polkit/patches/getnetgrent.patch | 37 ++++++++++++++++++++++++ srcpkgs/polkit/template | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/srcpkgs/polkit/patches/getnetgrent.patch b/srcpkgs/polkit/patches/getnetgrent.patch index 95792f2714d..dde221c3871 100644 --- a/srcpkgs/polkit/patches/getnetgrent.patch +++ b/srcpkgs/polkit/patches/getnetgrent.patch @@ -40,3 +40,40 @@ else { g_warning ("Unsupported identity"); +--- src/polkitbackend/polkitbackendjsauthority.c.orig 2015-05-08 10:26:51.509181105 +0200 ++++ src/polkitbackend/polkitbackendjsauthority.c 2015-05-08 10:27:41.357159439 +0200 +@@ -180,13 +180,17 @@ static JSClass js_polkit_class = { + + static JSBool js_polkit_log (JSContext *cx, unsigned argc, jsval *vp); + static JSBool js_polkit_spawn (JSContext *cx, unsigned argc, jsval *vp); ++#if defined HAVE_GETNETGRENT + static JSBool js_polkit_user_is_in_netgroup (JSContext *cx, unsigned argc, jsval *vp); ++#endif + + static JSFunctionSpec js_polkit_functions[] = + { + JS_FS("log", js_polkit_log, 0, 0), + JS_FS("spawn", js_polkit_spawn, 0, 0), ++#if defined HAVE_GETNETGRENT + JS_FS("_userIsInNetGroup", js_polkit_user_is_in_netgroup, 0, 0), ++#endif + JS_FS_END + }; + +@@ -1441,6 +1445,7 @@ js_polkit_spawn (JSContext *cx, + /* ---------------------------------------------------------------------------------------------------- */ + + ++#if defined HAVE_GETNETGRENT + static JSBool + js_polkit_user_is_in_netgroup (JSContext *cx, + unsigned argc, +@@ -1477,7 +1482,7 @@ js_polkit_user_is_in_netgroup (JSContext + out: + return ret; + } +- ++#endif + + + /* ---------------------------------------------------------------------------------------------------- */ diff --git a/srcpkgs/polkit/template b/srcpkgs/polkit/template index a83dcdb9323..f5f8e33ff2b 100644 --- a/srcpkgs/polkit/template +++ b/srcpkgs/polkit/template @@ -1,4 +1,4 @@ -# Template file for 'polkit' +# Template file for 'polkit' pkgname=polkit version=0.112 revision=10