From: maxice8 Date: Tue, 16 Jan 2018 10:25:32 +0000 (-0200) Subject: shared/musl_missing.h: replace ifdef with if on HAVE_[__]SECURE_GETENV X-Git-Tag: v235.3~20 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=047b54346db53a6144172f6c2fd05e329ad39913;p=elogind.git shared/musl_missing.h: replace ifdef with if on HAVE_[__]SECURE_GETENV now meson defines itself on config.h HAVE_[__]SECURE_GETENV, instead of checking if it is defined, check if it set to false value. also undefine before redefining it to true. --- diff --git a/src/shared/musl_missing.h b/src/shared/musl_missing.h index 7f3ffafaf..20fc20a56 100644 --- a/src/shared/musl_missing.h +++ b/src/shared/musl_missing.h @@ -41,9 +41,10 @@ extern char *program_invocation_short_name; * + test if the effective capability bit was set on the executable file * + test if the process has a nonempty permitted capability set */ -#if !defined(HAVE_SECURE_GETENV) && !defined(HAVE___SECURE_GETENV) +#if ! HAVE_SECURE_GETENV && ! HAVE___SECURE_GETENV # define secure_getenv(name) \ (issetugid() ? NULL : getenv(name)) +# undef HAVE_SECURE_GETENV # define HAVE_SECURE_GETENV 1 #endif // HAVE_[__]SECURE_GETENV