diff options
Diffstat (limited to 'security/polkit/patches/patch-test_mocklibc_src_grp.c')
-rw-r--r-- | security/polkit/patches/patch-test_mocklibc_src_grp.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/security/polkit/patches/patch-test_mocklibc_src_grp.c b/security/polkit/patches/patch-test_mocklibc_src_grp.c index b028d41e496..63cc062c985 100644 --- a/security/polkit/patches/patch-test_mocklibc_src_grp.c +++ b/security/polkit/patches/patch-test_mocklibc_src_grp.c @@ -1,10 +1,13 @@ -$NetBSD: patch-test_mocklibc_src_grp.c,v 1.2 2016/06/18 12:16:23 youri Exp $ +$NetBSD: patch-test_mocklibc_src_grp.c,v 1.3 2016/09/27 21:56:13 maya Exp $ * XXX: no fgetgrent(3) +Avoid conflicting with builtin setgrent on FreeBSD, it has a different +prototype: int setgrent(void) + --- test/mocklibc/src/grp.c.orig 2014-01-14 22:42:25.000000000 +0000 +++ test/mocklibc/src/grp.c -@@ -27,6 +27,12 @@ +@@ -27,6 +27,13 @@ static FILE *global_stream = NULL; @@ -14,6 +17,15 @@ $NetBSD: patch-test_mocklibc_src_grp.c,v 1.2 2016/06/18 12:16:23 youri Exp $ +} +#endif + ++#if !defined(__FreeBSD__) void setgrent(void) { if (global_stream) endgrent(); +@@ -37,6 +44,7 @@ void setgrent(void) { + + global_stream = fopen(path, "r"); + } ++#endif + + struct group *getgrent(void) { + if (!global_stream) |