aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/systemd/systemd/0006-configure-Check-for-additional-features-that-uclibc-.patch
blob: 43a0d3f61640515de662b9e2576eab5c74ceda22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 82d837b76618a773485b96e38b7b91083a7437e8 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 20 Feb 2015 05:05:45 +0000
Subject: [PATCH 06/19] configure: Check for additional features that uclibc
 doesnt support

This helps in supporting uclibc which does not have all features that
glibc might have

Upstream-Status: Denied [no desire for uclibc support]

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 configure.ac | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/configure.ac b/configure.ac
index 7f6b3b9..7c4b5a2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -110,6 +110,24 @@ AC_PATH_PROG([UMOUNT_PATH], [umount], [/usr/bin/umount], [$PATH:/usr/sbin:/sbin]
 
 AS_IF([! ln --relative --help > /dev/null 2>&1], [AC_MSG_ERROR([*** ln doesn't support --relative ***])])
 
+# check for few functions not implemented in uClibc
+
+AC_CHECK_FUNCS_ONCE(mkostemp execvpe posix_fallocate)
+
+# check for %ms format support - assume always no if cross compiling
+
+AC_MSG_CHECKING([whether %ms format is supported by *scanf])
+
+AC_LINK_IFELSE(
+	[AC_LANG_PROGRAM([
+	 #include <stdio.h>
+	 ],[
+	    char *buf1, *buf2, *buf3, str="1 2.3 abcde" ;
+	    int rc = sscanf(str, "%ms %ms %ms", &buf1, &buf2, &buf3) ;
+	    return (rc==3)?0:1;])],
+	[AC_DEFINE([HAVE_MSFORMAT], [1], [Define if %ms format is supported by *scanf.])],
+	[AC_MSG_RESULT([no])])
+
 M4_DEFINES=
 
 AC_CHECK_TOOL(OBJCOPY, objcopy)
-- 
2.10.2