PolicyKit: Branch 'master'

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Tue Oct 3 19:01:05 UTC 2023


 meson.build |   26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

New commits:
commit 67dba0e852505f018b01ef7373352e9b5de23304
Author: Sam James <sam at gentoo.org>
Date:   Tue Oct 3 19:01:03 2023 +0000

    meson.build: only run HAVE_SETNETGRENT_RETURN check if setnetgrent found

diff --git a/meson.build b/meson.build
index 50d19c0..f01e4e1 100644
--- a/meson.build
+++ b/meson.build
@@ -177,19 +177,21 @@ 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'))
 
-setnetgrent_return_src = '''
-  #include <stddef.h>
-  #ifdef HAVE_NETGROUP_H
-  #include <netgroup.h>
-  #else
-  #include <netdb.h>
-  #endif
-  int main() {
-      int r = setnetgrent (NULL);
-  };
-'''
+if config_h.get('HAVE_SETNETGRENT', false)
+  setnetgrent_return_src = '''
+    #include <stddef.h>
+    #ifdef HAVE_NETGROUP_H
+    #include <netgroup.h>
+    #else
+    #include <netdb.h>
+    #endif
+    int main() {
+        int r = setnetgrent (NULL);
+    };
+  '''
 
-config_h.set('HAVE_SETNETGRENT_RETURN', cc.compiles(setnetgrent_return_src, name: 'setnetgrent return support'))
+  config_h.set('HAVE_SETNETGRENT_RETURN', cc.compiles(setnetgrent_return_src, name: 'setnetgrent return support'))
+endif
 
 # Select wether to use libsystemd-login, libelogind or ConsoleKit for session tracking
 session_tracking = get_option('session_tracking')


More information about the hal-commit mailing list