From: Yu Watanabe Date: Thu, 6 Dec 2018 05:49:18 +0000 (+0100) Subject: missing: move definition of secure_getenv() to missing_stdlib.h X-Git-Tag: v240~126^2~11 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=470f348b97bf450d13d7bf4645331ae3d911834d;p=thirdparty%2Fsystemd.git missing: move definition of secure_getenv() to missing_stdlib.h --- diff --git a/src/basic/meson.build b/src/basic/meson.build index 8fc7665a913..ca27d44be99 100644 --- a/src/basic/meson.build +++ b/src/basic/meson.build @@ -113,6 +113,7 @@ basic_sources = files(''' missing_securebits.h missing_socket.h missing_stat.h + missing_stdlib.h missing_syscall.h missing_timerfd.h missing_type.h diff --git a/src/basic/missing.h b/src/basic/missing.h index 0651a397c94..15646eaaeb1 100644 --- a/src/basic/missing.h +++ b/src/basic/missing.h @@ -6,7 +6,6 @@ #include #include #include -#include #include #ifndef FS_NOCOW_FL @@ -61,14 +60,6 @@ #define DM_DEFERRED_REMOVE (1 << 17) #endif -#if ! HAVE_SECURE_GETENV -# if HAVE___SECURE_GETENV -# define secure_getenv __secure_getenv -# else -# error "neither secure_getenv nor __secure_getenv are available" -# endif -#endif - #ifndef CIFS_MAGIC_NUMBER # define CIFS_MAGIC_NUMBER 0xFF534D42 #endif @@ -128,6 +119,7 @@ #include "missing_random.h" #include "missing_resource.h" #include "missing_socket.h" +#include "missing_stdlib.h" #include "missing_timerfd.h" #include "missing_type.h" diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h new file mode 100644 index 00000000000..188a8d44066 --- /dev/null +++ b/src/basic/missing_stdlib.h @@ -0,0 +1,13 @@ +/* SPDX-License-Identifier: LGPL-2.1+ */ +#pragma once + +#include + +/* stdlib.h */ +#if !HAVE_SECURE_GETENV +# if HAVE___SECURE_GETENV +# define secure_getenv __secure_getenv +# else +# error "neither secure_getenv nor __secure_getenv are available" +# endif +#endif