From 0c79b070a70c09aac45a520aba7329bd12a7e16e Mon Sep 17 00:00:00 2001 From: Ryan Moeller Date: Wed, 22 Jul 2020 13:49:22 -0400 Subject: [PATCH] ZTS: Fix devname2devid build on FreeBSD with libudev When libudev is installed on FreeBSD, configure finds it and sets WANT_DEVNAME2DEVID, but it isn't found by the linker because we didn't specify where it is. Use LIBUDEV_LIBS so the location of the library gets added to the linker flags for devname2devid. Also use LIBUDEV_CFLAGS here in case some other platform needs it. Reviewed-by: Brian Behlendorf Reviewed-by: Arvind Sankar Signed-off-by: Ryan Moeller Closes #10590 --- tests/zfs-tests/cmd/devname2devid/Makefile.am | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/zfs-tests/cmd/devname2devid/Makefile.am b/tests/zfs-tests/cmd/devname2devid/Makefile.am index a8991bb781..b8b630dc2d 100644 --- a/tests/zfs-tests/cmd/devname2devid/Makefile.am +++ b/tests/zfs-tests/cmd/devname2devid/Makefile.am @@ -5,5 +5,6 @@ pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/bin if WANT_DEVNAME2DEVID pkgexec_PROGRAMS = devname2devid devname2devid_SOURCES = devname2devid.c -devname2devid_LDADD = -ludev +devname2devid_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS) +devname2devid_LDADD = $(LIBUDEV_LIBS) endif