mirror of
https://github.com/containers/podman.git
synced 2025-05-17 15:18:43 +08:00

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>
30 lines
589 B
Bash
Executable File
30 lines
589 B
Bash
Executable File
#!/usr/bin/env bash
|
|
if test $(${GO:-go} env GOOS) != "linux" ; then
|
|
exit 0
|
|
fi
|
|
tmpdir="$PWD/tmp.$RANDOM"
|
|
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;
|
|
}
|
|
EOF
|
|
if test $? -eq 0 ; then
|
|
echo libsubid
|
|
fi
|