[nautilus/compatibility-improvements: 5/5] Meson: Make sure _GNU_SOURCE is set



commit 09f00407eb38d25f36204e4db8004cedbda102fd
Author: Carlos Soriano <csoriano gnome org>
Date:   Sat Jun 9 17:58:46 2018 +0200

    Meson: Make sure _GNU_SOURCE is set
    
    _GNU_SOURCE is required to be able to use POSIX functions that are not
    available on non-Linux system. Specifically, we use sys/types for
    requesting user accounts with getpwent and similars.
    
    Usually systems seems to compile with this set, however some systems
    like RHEL doesn't assume it so.
    
    Since this is more correct to set it explicitly, this commit does that
    by passing an argument to meson project.

 meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/meson.build b/meson.build
index 784a6f714..7bbf38b8f 100644
--- a/meson.build
+++ b/meson.build
@@ -40,6 +40,7 @@ add_project_arguments(
     '-Werror=undef',
     '-Werror=uninitialized',
   ]),
+  '-D_GNU_SOURCE',
   language: 'c'
 )
 
@@ -129,7 +130,6 @@ conf.set_quoted('NAME_SUFFIX', name_suffix)
 #
 # gnome-desktop macros for thumbnailer sandboxing.
 ####################################
-conf.set10('_GNU_SOURCE', true)    #    `man user_namespaces` /CLONE_NEWUSER
 if is_linux
   conf.set10('ENABLE_SECCOMP', true)
   conf.set10('HAVE_BWRAP', true)
@@ -181,4 +181,4 @@ if get_option('extensions')
 endif
 
 # Compile GSettings schemas when installing from source.
-meson.add_install_script('build-aux/meson/postinstall.py')
+meson.add_install_script('build-aux/meson/postinstall.py')
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]