summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/rpm/rpm/rpmatch.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/rpm/rpm/rpmatch.patch')
-rw-r--r--meta/recipes-devtools/rpm/rpm/rpmatch.patch42
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rpm/rpm/rpmatch.patch b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
new file mode 100644
index 0000000000..20d13aa08c
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/rpmatch.patch
@@ -0,0 +1,42 @@
1Add configure check for rpmatch() and
2creates a compatable macro if it is not provided by the C library.
3
4This is needed for uclibc since it does not have the above function
5implemented.
6
7Upstream-Status: Pending
8
9Signed-off-by: Khem Raj <raj.khem@gmail.com>
10
11Index: rpm-5.4.14/configure.ac
12===================================================================
13--- rpm-5.4.14.orig/configure.ac
14+++ rpm-5.4.14/configure.ac
15@@ -943,7 +943,7 @@ AC_CHECK_FUNCS([dnl
16 ftok getaddrinfo getattrlist getcwd getdelim getline getmode getnameinfo dnl
17 getpassphrase getxattr getwd iconv inet_aton lchflags lchmod lchown dnl
18 lgetxattr lsetxattr lutimes madvise mempcpy mkdtemp mkstemp mtrace dnl
19- posix_fadvise posix_fallocate putenv realpath regcomp secure_getenv __secure_getenv dnl
20+ posix_fadvise posix_fallocate putenv realpath regcomp rpmatch secure_getenv __secure_getenv dnl
21 setattrlist setenv setlocale setmode setxattr dnl
22 sigaddset sigdelset sigemptyset sighold sigrelse sigpause dnl
23 sigprocmask sigsuspend sigaction dnl
24Index: rpm-5.4.14/system.h
25===================================================================
26--- rpm-5.4.14.orig/system.h
27+++ rpm-5.4.14/system.h
28@@ -353,6 +353,14 @@ extern int _tolower(int) __THROW /*@*/;
29 #include <libgen.h>
30 #endif
31
32+#ifndef HAVE_RPMATCH
33+#define rpmatch(line) \
34+ ( (line == NULL)? -1 : \
35+ (*line == 'y' || *line == 'Y')? 1 : \
36+ (*line == 'n' || *line == 'N')? 0 : \
37+ -1 )
38+#endif
39+
40 /* -- Retrofit glibc __progname */
41 #if defined __GLIBC__ && __GLIBC__ >= 2
42 #if __GLIBC_MINOR__ >= 1