They now use size_t instead of unsigned int. I patch Makefile in libcap to
solve this problem. Patch attached.
2017-02-04 19:32 GMT+10:00 Vladislav Dembskiy <[email protected]>:
> Dear colleagues,
>
> If you try to reinstall libcap-2.25 in chapter 6 after installing
> gperf-3.1 you will get compilation errors during make stage like these:
> ./_caps_output.gperf:85:15: error: unknown type name 'size_t'
> ./_caps_output.gperf:206:29: error: conflicting types for
> '__cap_lookup_name'
>
> With gperf-3.0.4 there are no problems.
>
> And it has been already reported somewhere that current version of systemd
> used in the book does not compile with gperf-3.1
>
> Kind regards,
>
> Vladislav
> <[email protected]>
>
> --
> http://lists.linuxfromscratch.org/listinfo/lfs-dev
> FAQ: http://www.linuxfromscratch.org/faq/
> Unsubscribe: See the above information page
>
diff -urNd libcap-2.25/libcap/Makefile libcap-2.25-gperf/libcap/Makefile
--- libcap-2.25/libcap/Makefile 2016-01-31 10:01:41.000000000 +1000
+++ libcap-2.25-gperf/libcap/Makefile 2017-01-09 15:08:59.112048765 +1000
@@ -41,7 +41,7 @@
./_makenames > cap_names.h
$(GPERF_OUTPUT): cap_names.list.h
- 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) > $@
+ perl -e 'print "struct __cap_token_s { const char *name; int index; };\n%{\n#include <stddef.h>\nconst struct __cap_token_s *__cap_lookup_name(const char *, size_t);\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) > $@
cap_names.list.h: Makefile $(KERNEL_HEADERS)/linux/capability.h
@echo "=> making $@ from $(KERNEL_HEADERS)/linux/capability.h"
--
http://lists.linuxfromscratch.org/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page