From 14cc383fb0e3eb63547d3997cfbd54bd0b99bcef Mon Sep 17 00:00:00 2001 From: Daniel Verkamp Date: Wed, 29 Mar 2017 12:53:35 -0700 Subject: [PATCH] test/iscsi: build iSCSI unit tests on FreeBSD Change-Id: Ie640069b831eba4eada9ff0955dca41af852d3a5 Signed-off-by: Daniel Verkamp --- lib/iscsi/iscsi.c | 5 +++++ test/lib/Makefile | 5 +---- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/iscsi/iscsi.c b/lib/iscsi/iscsi.c index 6bb2562051..0cf6a02a08 100644 --- a/lib/iscsi/iscsi.c +++ b/lib/iscsi/iscsi.c @@ -76,6 +76,11 @@ #define MAX_TMPBUF 1024 +#ifdef __FreeBSD__ +#define HAVE_SRANDOMDEV 1 +#define HAVE_ARC4RANDOM 1 +#endif + struct spdk_iscsi_globals g_spdk_iscsi; /* random value generation */ diff --git a/test/lib/Makefile b/test/lib/Makefile index 77ef47f3a1..4452a264f6 100644 --- a/test/lib/Makefile +++ b/test/lib/Makefile @@ -34,10 +34,7 @@ SPDK_ROOT_DIR := $(abspath $(CURDIR)/../..) include $(SPDK_ROOT_DIR)/mk/spdk.common.mk -DIRS-y = bdev blob blobfs env event log json jsonrpc nvme nvmf scsi ioat util -ifeq ($(OS),Linux) -DIRS-y += iscsi -endif +DIRS-y = bdev blob blobfs env event ioat iscsi json jsonrpc log nvme nvmf scsi util .PHONY: all clean $(DIRS-y)