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 <behlendorf1@llnl.gov>
Reviewed-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ryan Moeller <ryan@iXsystems.com>
Closes #10590
This commit is contained in:
Ryan Moeller 2020-07-22 13:49:22 -04:00 committed by GitHub
parent 59415fc9fb
commit 0c79b070a7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -5,5 +5,6 @@ pkgexecdir = $(datadir)/@PACKAGE@/zfs-tests/bin
if WANT_DEVNAME2DEVID if WANT_DEVNAME2DEVID
pkgexec_PROGRAMS = devname2devid pkgexec_PROGRAMS = devname2devid
devname2devid_SOURCES = devname2devid.c devname2devid_SOURCES = devname2devid.c
devname2devid_LDADD = -ludev devname2devid_CFLAGS = $(AM_CFLAGS) $(LIBUDEV_CFLAGS)
devname2devid_LDADD = $(LIBUDEV_LIBS)
endif endif