From 20a69e48a4e280190179d738b163f30945cb87bb Mon Sep 17 00:00:00 2001 From: "Richard W.M. Jones" Date: Sun, 8 May 2022 12:38:00 +0100 Subject: [PATCH] luks: Link with libcompat on Windows /usr/lib/gcc/x86_64-w64-mingw32/11.2.1/../../../../x86_64-w64-mingw32/bin/ld: ../../common/utils/.libs/libutils.a(libutils_la-full-rw.o): in function `full_pread': /builds/nbdkit/nbdkit/common/utils/full-rw.c:53: undefined reference to `pread' /usr/lib/gcc/x86_64-w64-mingw32/11.2.1/../../../../x86_64-w64-mingw32/bin/ld: ../../common/utils/.libs/libutils.a(libutils_la-full-rw.o): in function `full_pwrite': /builds/nbdkit/nbdkit/common/utils/full-rw.c:76: undefined reference to `pwrite' /usr/lib/gcc/x86_64-w64-mingw32/11.2.1/../../../../x86_64-w64-mingw32/bin/ld: ../../common/utils/.libs/libutils.a(libutils_la-vector.o): in function `generic_vector_reserve_page_aligned': /builds/nbdkit/nbdkit/common/utils/vector.c:112: undefined reference to `sysconf' /usr/lib/gcc/x86_64-w64-mingw32/11.2.1/../../../../x86_64-w64-mingw32/bin/ld: /builds/nbdkit/nbdkit/common/utils/vector.c:134: undefined reference to `posix_memalign' collect2: error: ld returned 1 exit status Fixes: commit 468919dce6c5eb57503eacac0f67e5dd87c58e6c (cherry picked from commit 4a28c4c46aedf270929a62a1c5ecf2c1129cd456) --- filters/luks/Makefile.am | 2 ++ 1 file changed, 2 insertions(+) diff --git a/filters/luks/Makefile.am b/filters/luks/Makefile.am index 622e5c3d..2688f696 100644 --- a/filters/luks/Makefile.am +++ b/filters/luks/Makefile.am @@ -45,6 +45,7 @@ nbdkit_luks_filter_la_SOURCES = \ nbdkit_luks_filter_la_CPPFLAGS = \ -I$(top_srcdir)/include \ -I$(top_srcdir)/common/include \ + -I$(top_srcdir)/common/replacements \ -I$(top_srcdir)/common/utils \ $(NULL) nbdkit_luks_filter_la_CFLAGS = \ @@ -53,6 +54,7 @@ nbdkit_luks_filter_la_CFLAGS = \ $(NULL) nbdkit_luks_filter_la_LIBADD = \ $(top_builddir)/common/utils/libutils.la \ + $(top_builddir)/common/replacements/libcompat.la \ $(IMPORT_LIBRARY_ON_WINDOWS) \ $(GNUTLS_LIBS) \ $(NULL) -- 2.31.1