From d2d3f4a7009ec08672f765a1f01c130fada081ef Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Wed, 27 Mar 2024 11:13:53 +0100 Subject: [PATCH] os: define SECURE_RPC locally instead of global config header Since this define is only used inside os subdir, move the definition there and out of the global config header. This also makes some further steps, e.g. checking whether it's supported, a litle bit easier. Signed-off-by: Enrico Weigelt, metux IT consult Part-of: --- include/meson.build | 1 - os/meson.build | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/meson.build b/include/meson.build index 30f44c7d7..025a5443e 100644 --- a/include/meson.build +++ b/include/meson.build @@ -131,7 +131,6 @@ conf_data.set_quoted('COMPILEDDEFAULTFONTPATH', default_font_path) conf_data.set('XORG_VERSION_CURRENT', release) conf_data.set('HASXDMAUTH', has_xdm_auth ? '1' : false) -conf_data.set('SECURE_RPC', get_option('secure-rpc') ? '1' : false) conf_data.set('HAVE_DLFCN_H', cc.has_header('dlfcn.h') ? '1' : false) conf_data.set('HAVE_EXECINFO_H', cc.has_header('execinfo.h') ? '1' : false) diff --git a/os/meson.build b/os/meson.build index 84acc0924..ee030a1d0 100644 --- a/os/meson.build +++ b/os/meson.build @@ -56,6 +56,9 @@ if get_option('xdmcp') srcs_os += 'xdmcp.c' endif +os_dep = [] +os_c_args = [] + rpc_dep = [] if get_option('secure-rpc') # prefer libtirpc (if available), otherwise ensure RPC functions are @@ -66,10 +69,10 @@ if get_option('secure-rpc') endif # XXX: also check if RPC library provides xdr_opaque_auth, authdes_(sec)create ??? srcs_os += 'rpcauth.c' + + os_c_args += '-DSECURE_RPC' endif -os_dep = [] -os_c_args = [] if get_option('xres') # Only the XRes extension cares about the client ID. os_c_args += '-DCLIENTIDS'