Commit 634ac768 authored by Krzysztof Karas's avatar Krzysztof Karas Committed by Tomasz Zawadzki
Browse files

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: default avatarKrzysztof Karas <krzysztof.karas@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16413


Reviewed-by: default avatarArtur Paszkiewicz <artur.paszkiewicz@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent 8d85ce85
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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