diff options
author | Lennart Poettering <lennart@poettering.net> | 2017-12-25 12:07:40 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2017-12-25 12:10:22 +0100 |
commit | 3c042add1db8948d7ed03be701fe097529785e77 (patch) | |
tree | 780993f79cb2b96200bcb66c9e2e953092eb4dfc /meson.build | |
parent | meson: use "args" for setting _GNU_SOURCE when checking for functions (diff) | |
download | systemd-3c042add1db8948d7ed03be701fe097529785e77.tar.xz systemd-3c042add1db8948d7ed03be701fe097529785e77.zip |
meson: when pivot_root() is added one day, look for it in <unistd.h>
We of course don't know in which header glibc will export pivot_root()
and if it ever will. But there's a good chance they'll place it where
chroot() is located, given the similarity in the operations, hence let's
try our luck and look for it at the same place.
If we are lucky this means we don't have to patch our code if glibc
decides to expose the call one day.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meson.build b/meson.build index eda9e382bf..9911afb0e7 100644 --- a/meson.build +++ b/meson.build @@ -456,7 +456,8 @@ endforeach foreach ident : [ ['memfd_create', '''#include <sys/mman.h>'''], ['gettid', '''#include <sys/types.h>'''], - ['pivot_root', '''#include <stdlib.h>'''], # no known header declares pivot_root + ['pivot_root', '''#include <stdlib.h> + #include <unistd.h>'''], # no known header declares pivot_root ['name_to_handle_at', '''#include <sys/types.h> #include <sys/stat.h> #include <fcntl.h>'''], |