From b7327a23eefd8172f63f699c03496cc16b764664 Mon Sep 17 00:00:00 2001 From: Steven Seungcheol Lee Date: Tue, 26 Nov 2024 15:02:25 +0900 Subject: [PATCH] test: Add library dependency for dlsym Fix build failure for test [27/79] Linking target test/ioctl/libmock-ioctl.so FAILED: test/ioctl/libmock-ioctl.so cc -o test/ioctl/libmock-ioctl.so test/ioctl/libmock-ioctl.so.p/mock.c.o test/ioctl/libmock-ioctl.so.p/util.c.o -Wl,--as-needed -Wl,--no-undefined -shared -fPIC -Wl,--start-group -Wl,-soname,libmock-ioctl.so -Wl,--end-group test/ioctl/libmock-ioctl.so.p/mock.c.o: In function `ioctl': /root/Desktop/repo/libnvme_upstream/.build/../test/ioctl/mock.c:154: undefined reference to `dlsym' Signed-off-by: Steven Seungcheol Lee --- test/ioctl/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/ioctl/meson.build b/test/ioctl/meson.build index bbee047d..961907a4 100644 --- a/test/ioctl/meson.build +++ b/test/ioctl/meson.build @@ -1,6 +1,8 @@ +dl_dep = dependency('dl') mock_ioctl = library( 'mock-ioctl', ['mock.c', 'util.c'], + dependencies: [dl_dep], ) # Add mock-ioctl to the LD_PRELOAD path so it overrides libc.