diff options
author | Michael Forney | 2013-10-03 11:36:05 +0200 |
---|---|---|
committer | Karel Zak | 2013-10-04 11:50:33 +0200 |
commit | 695e4e1a9862a5d2bc28dd31aa4cfafd4fd0caa4 (patch) | |
tree | 9b9f3c27ed8a59b3e16329935fed7d7c74066be6 /configure.ac | |
parent | testsL fix py<libname> check (diff) | |
download | kernel-qcow2-util-linux-695e4e1a9862a5d2bc28dd31aa4cfafd4fd0caa4.tar.gz kernel-qcow2-util-linux-695e4e1a9862a5d2bc28dd31aa4cfafd4fd0caa4.tar.xz kernel-qcow2-util-linux-695e4e1a9862a5d2bc28dd31aa4cfafd4fd0caa4.zip |
build-sys: Use _POSIX_VERSION to determine support for %m
%m is included in POSIX 2008, so we can check if the libc implements
that before failing.
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index cbcda46c8..95ff8b3d2 100644 --- a/configure.ac +++ b/configure.ac @@ -430,6 +430,7 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier], [AC_COMPILE_IFELSE([AC_LANG_SOURCE([ #include <stdio.h> + #include <unistd.h> #ifdef __GLIBC__ @@ -437,8 +438,13 @@ AC_CACHE_VAL([scanf_cv_alloc_modifier], #error %m is not available #endif - #else + #elif defined(_POSIX_VERSION) + #if _POSIX_VERSION < 200809L + #error %m is not available + #endif + + #else #error Your C-library is not supported. #endif ])], |