raster pushed a commit to branch master. http://git.enlightenment.org/core/enlightenment.git/commit/?id=56d2cdc294b6554e1153d408e618c8a8694be393
commit 56d2cdc294b6554e1153d408e618c8a8694be393 Author: Carsten Haitzler (Rasterman) <[email protected]> Date: Mon Apr 12 11:00:32 2021 +0100 build - find environe and build when found meson didnt look for environ thus it was never found and defined. this is a fallback for having no clearenv() so essentially no os work talking about is in this situation anymore. --- meson.build | 11 +++++++++++ src/bin/e_util_suid.h | 2 +- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index f081e5b1a..fb3749bb3 100644 --- a/meson.build +++ b/meson.build @@ -198,6 +198,17 @@ endif dep_fnmatch = cc.find_library('fnmatch', required: false) +code = '''#define _GNU_SOURCE 1 +#include <unistd.h> +#include <stdio.h> +extern char **environ; +void func(void) { printf("%p\n", environ); } +''' +if cc.compiles(code, args : '-lc', name : 'environ check') + config_h.set10('HAVE_ENVIRON', true) +endif + + add_global_arguments('-DPACKAGE_BIN_DIR="@0@"'.format(dir_bin), language: 'c') add_global_arguments('-DPACKAGE_LIB_DIR="@0@"'.format(dir_lib), language: 'c') add_global_arguments('-DPACKAGE_DATA_DIR="@0@"'.format(join_paths(dir_data, proj)), language: 'c') diff --git a/src/bin/e_util_suid.h b/src/bin/e_util_suid.h index be961a520..3b7e401df 100644 --- a/src/bin/e_util_suid.h +++ b/src/bin/e_util_suid.h @@ -198,7 +198,7 @@ e_setuid_setup(uid_t *caller_uid, gid_t *caller_gid, char **caller_user, char ** # ifdef HAVE_ENVIRON if (environ) { - int again; + int i, again; // go over environment array again and again... safely do { --
