mirror of
https://github.com/containers/skopeo.git
synced 2026-02-01 06:51:21 +00:00
Refine the test for the "libdm_no_deferred_remove" build tag so that we actually check if we can link with the deferred removal function. Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
16 lines
332 B
Bash
Executable File
16 lines
332 B
Bash
Executable File
#!/bin/bash
|
|
tmpdir="$PWD/tmp.$RANDOM"
|
|
mkdir -p "$tmpdir"
|
|
trap 'rm -fr "$tmpdir"' EXIT
|
|
cc -o "$tmpdir"/libdm_tag -ldevmapper -x c - > /dev/null 2> /dev/null << EOF
|
|
#include <libdevmapper.h>
|
|
int main() {
|
|
struct dm_task *task;
|
|
dm_task_deferred_remove(task);
|
|
return 0;
|
|
}
|
|
EOF
|
|
if test $? -ne 0 ; then
|
|
echo libdm_no_deferred_remove
|
|
fi
|