diff options
author | Andrew G. Morgan <morgan@kernel.org> | 2022-04-10 14:49:26 -0700 |
---|---|---|
committer | Andrew G. Morgan <morgan@kernel.org> | 2022-04-10 14:49:26 -0700 |
commit | fc029cb5170361981b6d971fe56ff60f1ab10b45 (patch) | |
tree | 1af0ccb779a39254fe8e13337601def46147cde2 | |
parent | ceaa591b012610d3fe402d33e7d7ca14716cf965 (diff) | |
download | libcap-fc029cb5170361981b6d971fe56ff60f1ab10b45.tar.gz |
Include LIBCAP_{MAJOR,MINOR} #define's in sys/capability.h
It looks like various distributions are fairly far behind HEAD for
their version of libcap. This way folk can work around a lack of
features in their code.
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
-rw-r--r-- | Makefile | 3 | ||||
-rw-r--r-- | libcap/include/sys/capability.h | 6 |
2 files changed, 9 insertions, 0 deletions
@@ -37,6 +37,9 @@ distclean: clean @echo "CONFIRM Go package cap has right version dependency on cap/psx:" for x in $$(find . -name go.mod); do $(BUILD_FGREP) -v "module" $$x | $(BUILD_FGREP) "kernel.org/pub/linux/libs/security/libcap" > /dev/null || continue ; $(BUILD_FGREP) "v$(GOMAJOR).$(VERSION).$(MINOR)" $$x > /dev/null && continue ; echo "$$x is not updated. Try running: ./gomods.sh v$(GOMAJOR).$(VERSION).$(MINOR)" ; exit 1 ; done @echo "ALL go.mod files updated" + @echo "Confirm headers export current version" + $(BUILD_FGREP) "#define LIBCAP_MAJOR $(VERSION)" libcap/include/sys/capability.h + $(BUILD_FGREP) "#define LIBCAP_MINOR $(MINOR)" libcap/include/sys/capability.h @echo "Now validate that everything is checked in to a clean tree.." test -z "$$(git status --ignored -s)" @echo "All good!" diff --git a/libcap/include/sys/capability.h b/libcap/include/sys/capability.h index c85413b..730af37 100644 --- a/libcap/include/sys/capability.h +++ b/libcap/include/sys/capability.h @@ -15,6 +15,12 @@ extern "C" { #endif /* + * Provide a programmatic way to #ifdef around features. + */ +#define LIBCAP_MAJOR 2 +#define LIBCAP_MINOR 63 + +/* * This file complements the kernel file by providing prototype * information for the user library. */ |