From 905497c86d95eaa24fa178c992d9c9bf4187a6b4 Mon Sep 17 00:00:00 2001 From: Yu Watanabe Date: Sat, 1 Mar 2025 01:07:35 +0900 Subject: [PATCH] missing_stdlib: secure_getenv() exists since glibc-2.17 --- meson.build | 4 ---- src/basic/missing_stdlib.h | 13 ------------- src/shared/libcrypt-util.c | 1 - 3 files changed, 18 deletions(-) delete mode 100644 src/basic/missing_stdlib.h diff --git a/meson.build b/meson.build index 7cf12bc452e..a8876cfe019 100644 --- a/meson.build +++ b/meson.build @@ -598,10 +598,6 @@ endforeach conf.set10('WANT_LINUX_FS_H', want_linux_fs_h) -foreach ident : ['secure_getenv', '__secure_getenv'] - conf.set10('HAVE_' + ident.to_upper(), cc.has_function(ident)) -endforeach - foreach ident : [ ['fchmodat2', '''#include #include '''], # no known header declares fchmodat2 diff --git a/src/basic/missing_stdlib.h b/src/basic/missing_stdlib.h deleted file mode 100644 index 8c76f93eb2f..00000000000 --- a/src/basic/missing_stdlib.h +++ /dev/null @@ -1,13 +0,0 @@ -/* SPDX-License-Identifier: LGPL-2.1-or-later */ -#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 diff --git a/src/shared/libcrypt-util.c b/src/shared/libcrypt-util.c index 50b2502166b..c04c0eeea86 100644 --- a/src/shared/libcrypt-util.c +++ b/src/shared/libcrypt-util.c @@ -24,7 +24,6 @@ #include "log.h" #include "macro.h" #include "memory-util.h" -#include "missing_stdlib.h" #include "random-util.h" #include "string-util.h" #include "strv.h" -- 2.47.3