diff options
author | Karel Zak | 2011-10-01 15:33:53 +0200 |
---|---|---|
committer | Karel Zak | 2011-10-10 14:42:40 +0200 |
commit | 640fc1b8194e9d7f10302f19cba8d7671c8b1e9d (patch) | |
tree | 1a69507d841b94fd77a81c9912444ddf629bbaa9 /include | |
parent | build-sys: rename BUILD_BUG_ON_ZERO definition (diff) | |
download | kernel-qcow2-util-linux-640fc1b8194e9d7f10302f19cba8d7671c8b1e9d.tar.gz kernel-qcow2-util-linux-640fc1b8194e9d7f10302f19cba8d7671c8b1e9d.tar.xz kernel-qcow2-util-linux-640fc1b8194e9d7f10302f19cba8d7671c8b1e9d.zip |
build-sys: check scanf %ms modifier
Without the check libmount builds on systems that has older than 2.7
glibc are silently unsuccessful. The missing %ms modifier will, at
least, result on such system missing output of findmnt and lsblk
commands. If either %ms or %as modifiers are present the libmount
build is disabled.
Based on patch from: Sami Kerola <kerolasa@iki.fi>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/c.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/c.h b/include/c.h index 259e6b6cc..c4a95aa2b 100644 --- a/include/c.h +++ b/include/c.h @@ -224,4 +224,13 @@ static inline int dirfd(DIR *d) #define UTIL_LINUX_VERSION _("%s from %s\n"), program_invocation_short_name, PACKAGE_STRING +/* + * scanf modifiers for "strings allocation" + */ +#ifdef HAVE_SCANF_MS_MODIFIER +#define UL_SCNsA "%ms" +#elif defined(HAVE_SCANF_AS_MODIFIER) +#define UL_SCNsA "%as" +#endif + #endif /* UTIL_LINUX_C_H */ |