CRUX-ARM : Home

Home :: Documentation :: Download :: Development :: Community :: Ports :: Packages :: Bugs :: Links :: About :: Donors
grep: updated to 3.1
[crossrootfs.git] / libcap / libcap-2.25-gperf.patch
CommitLineData
a11d64f2
VM
1From 13992f56d80c0ee20e08f99b8e8ff37d63e65f9d Mon Sep 17 00:00:00 2001
2From: Mike Gilbert <floppym@gentoo.org>
3Date: Mon, 16 Jan 2017 12:09:35 -0500
4Subject: [PATCH] Fix build with gperf-3.1
5
6gperf-3.1 lookup functions take a size_t instead of unsigned int.
7
8To resolve this:
9
101. Pass --includes to gperf so that size_t is defined.
112. Remove __cap_lookup_name declaration.
12---
13 libcap/Makefile | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/libcap/Makefile b/libcap/Makefile
17index d189777..634a042 100644
18--- a/libcap/Makefile
19+++ b/libcap/Makefile
20@@ -41,7 +41,7 @@ cap_names.h: _makenames
21 ./_makenames > cap_names.h
22
23 $(GPERF_OUTPUT): cap_names.list.h
24- perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\nconst struct __cap_token_s *__cap_lookup_name(const char *, unsigned int);\n%}\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
25+ perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%%\n"; while ($$l = <>) { $$l =~ s/[\{\"]//g; $$l =~ s/\}.*// ; print $$l; }' < $< | gperf --ignore-case --language=ANSI-C --includes --readonly --null-strings --global-table --hash-function-name=__cap_hash_name --lookup-function-name="__cap_lookup_name" -c -t -m20 $(INDENT) > $@
26
27 cap_names.list.h: Makefile $(KERNEL_HEADERS)/linux/capability.h
28 @echo "=> making $@ from $(KERNEL_HEADERS)/linux/capability.h"
29--
302.11.0
31