diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-04-12 11:00:32 +0100 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2021-04-12 11:05:23 +0100 |
commit | 56d2cdc294b6554e1153d408e618c8a8694be393 (patch) | |
tree | b816bd091cddca182597ed6e361b2c77052e9f59 /meson.build | |
parent | 7e02c59a43b2a8492e2cf8695c000075aa8f127e (diff) | |
download | enlightenment-56d2cdc294b6554e1153d408e618c8a8694be393.tar.gz |
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.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meson.build b/meson.build index f081e5b1a2..fb3749bb3b 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') |