configure: check for O_NOFOLLOW flag
If the O_NOFOLLOW flag used by open() is not defined, try it with _GNU_SOURCE. This is needed with glibc-2.11 and earlier. Reported-by: Marius Rohde <marius.rohde@meinberg.de>
This commit is contained in:
parent
ae2e0318d1
commit
f650b8c515
1 changed files with 14 additions and 0 deletions
14
configure
vendored
14
configure
vendored
|
@ -655,6 +655,20 @@ then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! test_code 'O_NOFOLLOW flag' 'sys/types.h sys/stat.h fcntl.h' '' "$LIBS" \
|
||||||
|
'return open("/dev/null", O_NOFOLLOW);'
|
||||||
|
then
|
||||||
|
if test_code 'O_NOFOLLOW flag with _GNU_SOURCE' 'sys/types.h sys/stat.h fcntl.h' \
|
||||||
|
'-D_GNU_SOURCE' "$LIBS" \
|
||||||
|
'return open("/dev/null", O_NOFOLLOW);'
|
||||||
|
then
|
||||||
|
add_def _GNU_SOURCE
|
||||||
|
else
|
||||||
|
echo "error: open() does not support O_NOFOLLOW flag"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if [ $try_clock_gettime = "1" ]; then
|
if [ $try_clock_gettime = "1" ]; then
|
||||||
if test_code 'clock_gettime()' 'time.h' '' '' \
|
if test_code 'clock_gettime()' 'time.h' '' '' \
|
||||||
'clock_gettime(CLOCK_REALTIME, NULL);'
|
'clock_gettime(CLOCK_REALTIME, NULL);'
|
||||||
|
|
Loading…
Reference in a new issue