diff options
| author | Jan Beich <jbeich@FreeBSD.org> | 2024-05-25 12:40:25 +0000 |
|---|---|---|
| committer | Daniel Eklöf <daniel@ekloef.se> | 2024-06-07 14:31:11 +0000 |
| commit | f67449700b169dfab971773530ca8268448d4fbd (patch) | |
| tree | a4f6f6aa23e50e9c4bd16d89448b4122cdc920be | |
| parent | doc: foot.ini: document pixelsize (diff) | |
meson: auto-detect execvpe on FreeBSD
https://github.com/freebsd/freebsd-src/commit/0667d0e0e365
| -rw-r--r-- | meson.build | 5 | ||||
| -rw-r--r-- | slave.c | 6 |
2 files changed, 8 insertions, 3 deletions
diff --git a/meson.build b/meson.build index 7c714ddf..cb5d4741 100644 --- a/meson.build +++ b/meson.build @@ -16,6 +16,11 @@ if cc.has_function('memfd_create') add_project_arguments('-DMEMFD_CREATE', language: 'c') endif +# Missing on DragonFly, FreeBSD < 14.1 +if cc.has_function('execvpe') + add_project_arguments('-DEXECVPE', language: 'c') +endif + utmp_backend = get_option('utmp-backend') if utmp_backend == 'auto' host_os = host_machine.system() @@ -31,7 +31,7 @@ struct environ { char **envp; }; -#if defined(__FreeBSD__) +#if !defined(EXECVPE) static char * find_file_in_path(const char *file) { @@ -82,11 +82,11 @@ foot_execvpe(const char *file, char *const argv[], char *const envp[]) return ret; } -#else /* !__FreeBSD__ */ +#else /* EXECVPE */ #define foot_execvpe(file, argv, envp) execvpe(file, argv, envp) -#endif /* !__FreeBSD__ */ +#endif /* EXECVPE */ static bool is_valid_shell(const char *shell) |
