summaryrefslogtreecommitdiff
path: root/hack
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2021-12-20 16:44:28 +0100
committerGitHub <noreply@github.com>2021-12-20 16:44:28 +0100
commitc133c5f0473ce80b903c6c351eb7c29fb14abe8f (patch)
tree154105ed244a612993be96f93a06011129c9b944 /hack
parent516c16c366531ec8c05a496bf3ffe1c6386aedc6 (diff)
parent3570c38ffea83cd6c24411c835b3b7117a21c46b (diff)
downloadpodman-c133c5f0473ce80b903c6c351eb7c29fb14abe8f.tar.gz
podman-c133c5f0473ce80b903c6c351eb7c29fb14abe8f.tar.bz2
podman-c133c5f0473ce80b903c6c351eb7c29fb14abe8f.zip
Merge pull request #12655 from giuseppe/fix-libsubid-test
build: fix test for subid 4
Diffstat (limited to 'hack')
-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;
}