From 640fc1b8194e9d7f10302f19cba8d7671c8b1e9d Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Sat, 1 Oct 2011 15:33:53 +0200 Subject: 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 Signed-off-by: Karel Zak --- include/c.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/c.h') 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 */ -- cgit v1.2.3-55-g7522