summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGiuseppe Scrivano <gscrivan@redhat.com>2021-12-20 09:06:49 +0100
committerGiuseppe Scrivano <gscrivan@redhat.com>2021-12-20 10:09:34 +0100
commit48cb446514f1ae8089530d728337b7a91730afe2 (patch)
tree2834f8d658abeee8bce21aebe9e48c1606bb35d6
parentf45070ee0e63ea26e475e618ff32a498096fa561 (diff)
downloadpodman-48cb446514f1ae8089530d728337b7a91730afe2.tar.gz
podman-48cb446514f1ae8089530d728337b7a91730afe2.tar.bz2
podman-48cb446514f1ae8089530d728337b7a91730afe2.zip
build: fix test for subid 4
libsubid changes its ABI in version 4. Account for the different name in the configure script. Closes: https://github.com/containers/podman/issues/12654 [NO NEW TESTS NEEDED] it is a change in the build script Signed-off-by: Giuseppe Scrivano <gscrivan@redhat.com>
-rwxr-xr-xhack/libsubid_tag.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/hack/libsubid_tag.sh b/hack/libsubid_tag.sh
index ab6af9e30..31412b3e6 100755
--- a/hack/libsubid_tag.sh
+++ b/hack/libsubid_tag.sh
@@ -7,9 +7,19 @@ mkdir -p "$tmpdir"
trap 'rm -fr "$tmpdir"' EXIT
cc -o "$tmpdir"/libsubid_tag -l subid -x c - > /dev/null 2> /dev/null << EOF
#include <shadow/subid.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+const char *Prog = "test";
+FILE *shadow_logfd = NULL;
+
int main() {
struct subid_range *ranges = NULL;
+#if SUBID_ABI_MAJOR >= 4
+ subid_get_uid_ranges("root", &ranges);
+#else
get_subuid_ranges("root", &ranges);
+#endif
free(ranges);
return 0;
}