config: detect uuid_generate_sha1() function definition
Some systems (like FreeBSD and Centos 7) do not have this method in their system libraries. To let bdev UUIDs be generated with SHA1, detect if this symbol is present. Otherwise, define a new symbol that indicates a need to use internal implementation of uuid_generate_sha1() method. Change-Id: I3a3617d1b413af7f5af487b2eb6f3fe33f58a95e Signed-off-by: Krzysztof Karas <krzysztof.karas@intel.com> Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16413 Reviewed-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
This commit is contained in:
parent
8d85ce85b9
commit
634ac768ba
3
CONFIG
3
CONFIG
@ -204,6 +204,9 @@ CONFIG_IDXD_KERNEL=n
|
||||
# arc4random is available in stdlib.h
|
||||
CONFIG_HAVE_ARC4RANDOM=n
|
||||
|
||||
# uuid_generate_sha1 is available in uuid/uuid.h
|
||||
CONFIG_HAVE_UUID_GENERATE_SHA1=n
|
||||
|
||||
# Is DPDK using libbsd?
|
||||
CONFIG_HAVE_LIBBSD=n
|
||||
|
||||
|
5
configure
vendored
5
configure
vendored
@ -1109,6 +1109,11 @@ if echo -e '#include <stdlib.h>\nint main(void) { arc4random(); return 0; }\n' \
|
||||
CONFIG[HAVE_ARC4RANDOM]="y"
|
||||
fi
|
||||
|
||||
if echo -e '#include <uuid/uuid.h>\nint main(void) { uuid_generate_sha1(NULL, NULL, NULL, 0); return 0; }\n' \
|
||||
| "${BUILD_CMD[@]}" - -luuid 2> /dev/null; then
|
||||
CONFIG[HAVE_UUID_GENERATE_SHA1]="y"
|
||||
fi
|
||||
|
||||
if [[ "${CONFIG[OCF]}" = "y" ]]; then
|
||||
echo "WARNING: OCF - bdev_ocf is deprecated."
|
||||
# If OCF_PATH is a file, assume it is a library and use it to compile with
|
||||
|
Loading…
Reference in New Issue
Block a user