mirror of
https://git.proxmox.com/git/mirror_lxc
synced 2025-07-27 11:13:50 +00:00
build: remove unneeded variables
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
parent
c6ea1dec85
commit
4ad3a929d9
17
meson.build
17
meson.build
@ -179,10 +179,8 @@ foreach decl : [
|
||||
]
|
||||
|
||||
# We get -1 if the size cannot be determined
|
||||
have = cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
|
||||
|
||||
if have == true
|
||||
conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
|
||||
if cc.sizeof(decl, prefix : decl_headers, args : '-D_GNU_SOURCE') > 0
|
||||
conf.set10('HAVE_' + decl.underscorify().to_upper(), true)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
@ -228,9 +226,8 @@ foreach ident : [
|
||||
#include <sys/resource.h>'''],
|
||||
]
|
||||
|
||||
have = cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
|
||||
if have == true
|
||||
conf.set10('HAVE_' + ident[0].to_upper(), have)
|
||||
if cc.has_function(ident[0], prefix : ident[1], args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_' + ident[0].to_upper(), true)
|
||||
endif
|
||||
endforeach
|
||||
|
||||
@ -259,10 +256,8 @@ if libseccomp.found()
|
||||
]
|
||||
|
||||
# We get -1 if the size cannot be determined
|
||||
have = cc.sizeof(decl, prefix : seccomp_headers, args : '-D_GNU_SOURCE') > 0
|
||||
|
||||
if have == true
|
||||
conf.set10('HAVE_' + decl.underscorify().to_upper(), have)
|
||||
if cc.sizeof(decl, prefix : seccomp_headers, args : '-D_GNU_SOURCE') > 0
|
||||
conf.set10('HAVE_' + decl.underscorify().to_upper(), true)
|
||||
endif
|
||||
endforeach
|
||||
endif
|
||||
|
@ -7,7 +7,7 @@ include_sources = files(
|
||||
'netns_ifaddrs.h')
|
||||
|
||||
if cc.has_function('getline', prefix : '#include <stdio.h>', args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_GETLINE', have)
|
||||
conf.set10('HAVE_GETLINE', true)
|
||||
else
|
||||
include_sources += files(
|
||||
'getline.c',
|
||||
@ -15,7 +15,7 @@ else
|
||||
endif
|
||||
|
||||
if cc.has_function('fexecve', prefix : '#include <unistd.h>', args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_FEXECVE', have)
|
||||
conf.set10('HAVE_FEXECVE', true)
|
||||
else
|
||||
include_sources += files(
|
||||
'fexecve.c',
|
||||
@ -29,7 +29,7 @@ getgr_headers = '''
|
||||
'''
|
||||
|
||||
if cc.has_function('getgrgid_r', prefix : getgr_headers, args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_GETGRGID_R', have)
|
||||
conf.set10('HAVE_GETGRGID_R', true)
|
||||
else
|
||||
include_sources += files(
|
||||
'getgrgid_r.c',
|
||||
@ -43,17 +43,17 @@ mntent_headers = '''
|
||||
|
||||
have_hasmntopt = cc.has_function('hasmntopt', prefix : mntent_headers, args : '-D_GNU_SOURCE')
|
||||
if have_hasmntopt
|
||||
conf.set10('HAVE_HASMNTOPT', have)
|
||||
conf.set10('HAVE_HASMNTOPT', true)
|
||||
endif
|
||||
|
||||
have_setmntent = cc.has_function('setmntent', prefix : mntent_headers, args : '-D_GNU_SOURCE')
|
||||
if have_setmntent
|
||||
conf.set10('HAVE_SETMNTENT', have)
|
||||
conf.set10('HAVE_SETMNTENT', true)
|
||||
endif
|
||||
|
||||
have_endmntent = cc.has_function('endmntent', prefix : mntent_headers, args : '-D_GNU_SOURCE')
|
||||
if have_endmntent
|
||||
conf.set10('HAVE_ENDMNTENT', have)
|
||||
conf.set10('HAVE_ENDMNTENT', true)
|
||||
endif
|
||||
|
||||
if have_hasmntopt == false or have_setmntent == false or have_endmntent == false
|
||||
@ -63,7 +63,7 @@ if have_hasmntopt == false or have_setmntent == false or have_endmntent == false
|
||||
endif
|
||||
|
||||
if cc.has_function('strlcpy', prefix : '#include <string.h>', args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_STRLCPY', have)
|
||||
conf.set10('HAVE_STRLCPY', true)
|
||||
else
|
||||
include_sources += files(
|
||||
'strlcpy.c',
|
||||
@ -71,7 +71,7 @@ else
|
||||
endif
|
||||
|
||||
if cc.has_function('strlcat', prefix : '#include <string.h>', args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_STRLCAT', have)
|
||||
conf.set10('HAVE_STRLCAT', true)
|
||||
else
|
||||
include_sources += files(
|
||||
'strlcat.c',
|
||||
@ -79,7 +79,7 @@ else
|
||||
endif
|
||||
|
||||
if cc.has_function('strchrnul', prefix : '#include <string.h>', args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_STRCHRNUL', have)
|
||||
conf.set10('HAVE_STRCHRNUL', true)
|
||||
else
|
||||
include_sources += files(
|
||||
'strchrnul.c',
|
||||
@ -87,7 +87,7 @@ else
|
||||
endif
|
||||
|
||||
if cc.has_function('openpty', prefix : '#include <pty.h>', args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_OPENPTY', have)
|
||||
conf.set10('HAVE_OPENPTY', true)
|
||||
else
|
||||
include_sources += files(
|
||||
'openpty.c',
|
||||
|
@ -135,7 +135,7 @@ tools_lxc_console_sources = files(
|
||||
'lxc_console.c') + tools_common_sources
|
||||
|
||||
if cc.has_function('getsubopt', prefix : '#include <stdlib.h>', args : '-D_GNU_SOURCE')
|
||||
conf.set10('HAVE_GETSUBOPT', have)
|
||||
conf.set10('HAVE_GETSUBOPT', true)
|
||||
else
|
||||
include_sources += files(
|
||||
'tools/include/getsubopt.c',
|
||||
|
Loading…
Reference in New Issue
Block a user