Index: Makefile
===================================================================
RCS file: /cvs/ports/sysutils/polkit/Makefile,v
retrieving revision 1.88
diff -u -p -u -r1.88 Makefile
--- Makefile	30 Oct 2021 14:26:23 -0000	1.88
+++ Makefile	12 Nov 2021 14:03:51 -0000
@@ -3,6 +3,7 @@
 COMMENT=		framework for granting privileged operations to users
 
 DISTNAME=		polkit-0.120
+REVISION=		0
 
 SHARED_LIBS += polkit-gobject-1          2.0 # 0.0.0
 SHARED_LIBS += polkit-agent-1            2.0 # 0.0.0
Index: patches/patch-meson_build
===================================================================
RCS file: patches/patch-meson_build
diff -N patches/patch-meson_build
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ patches/patch-meson_build	12 Nov 2021 14:03:51 -0000
@@ -0,0 +1,48 @@
+$OpenBSD$
+
+Fix check for whether setnetgrent has a return value
+
+Index: meson.build
+--- meson.build.orig
++++ meson.build
+@@ -149,19 +149,28 @@ host_system = host_machine.system()
+ config_h.set('HAVE_' + host_system.to_upper(), true)
+ 
+ # Check whether setnetgrent has a return value
+-config_h.set('HAVE_NETGROUP_H', cc.has_header('netgroup.h'))
++# and if netgroup.h is needed
++if cc.has_header('netgroup.h')
++  config_h.set('HAVE_NETGROUP_H', true)
+ 
+-setnetgrent_return_src = '''
+-  #include <stddef.h>
+-  #ifdef HAVE_NETGROUP_H
+-  #include <netgroup.h>
+-  #else
+-  #include <netdb.h>
+-  #endif
+-  int main() {
+-      int r = setnetgrent (NULL);
+-  };
+-'''
++  setnetgrent_return_src = '''
++    #include <stddef.h>
++    #include <netgroup.h>
++    int main() {
++        int r = setnetgrent (NULL);
++    };
++  '''
++else
++  config_h.set('HAVE_NETGROUP_H', false)
++
++  setnetgrent_return_src = '''
++    #include <stddef.h>
++    #include <netdb.h>
++    int main() {
++        int r = setnetgrent (NULL);
++    };
++  '''
++endif
+ 
+ config_h.set('HAVE_SETNETGRENT_RETURN', cc.compiles(setnetgrent_return_src, name: 'setnetgrent return support'))
+ 
