Blame SOURCES/0007-luks-Link-with-libcompat-on-Windows.patch

3cdd4c
From 9416effd73a5cb2e1c929449fca88fd7152aa1be Mon Sep 17 00:00:00 2001
3cdd4c
From: "Richard W.M. Jones" <rjones@redhat.com>
3cdd4c
Date: Sun, 8 May 2022 12:38:00 +0100
3cdd4c
Subject: [PATCH] luks: Link with libcompat on Windows
3cdd4c
3cdd4c
/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':
3cdd4c
/builds/nbdkit/nbdkit/common/utils/full-rw.c:53: undefined reference to `pread'
3cdd4c
/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':
3cdd4c
/builds/nbdkit/nbdkit/common/utils/full-rw.c:76: undefined reference to `pwrite'
3cdd4c
/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':
3cdd4c
/builds/nbdkit/nbdkit/common/utils/vector.c:112: undefined reference to `sysconf'
3cdd4c
/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'
3cdd4c
collect2: error: ld returned 1 exit status
3cdd4c
3cdd4c
Fixes: commit 468919dce6c5eb57503eacac0f67e5dd87c58e6c
3cdd4c
(cherry picked from commit 4a28c4c46aedf270929a62a1c5ecf2c1129cd456)
3cdd4c
---
3cdd4c
 filters/luks/Makefile.am | 2 ++
3cdd4c
 1 file changed, 2 insertions(+)
3cdd4c
3cdd4c
diff --git a/filters/luks/Makefile.am b/filters/luks/Makefile.am
3cdd4c
index 622e5c3d..2688f696 100644
3cdd4c
--- a/filters/luks/Makefile.am
3cdd4c
+++ b/filters/luks/Makefile.am
3cdd4c
@@ -45,6 +45,7 @@ nbdkit_luks_filter_la_SOURCES = \
3cdd4c
 nbdkit_luks_filter_la_CPPFLAGS = \
3cdd4c
 	-I$(top_srcdir)/include \
3cdd4c
 	-I$(top_srcdir)/common/include \
3cdd4c
+	-I$(top_srcdir)/common/replacements \
3cdd4c
 	-I$(top_srcdir)/common/utils \
3cdd4c
 	$(NULL)
3cdd4c
 nbdkit_luks_filter_la_CFLAGS = \
3cdd4c
@@ -53,6 +54,7 @@ nbdkit_luks_filter_la_CFLAGS = \
3cdd4c
 	$(NULL)
3cdd4c
 nbdkit_luks_filter_la_LIBADD = \
3cdd4c
 	$(top_builddir)/common/utils/libutils.la \
3cdd4c
+	$(top_builddir)/common/replacements/libcompat.la \
3cdd4c
 	$(IMPORT_LIBRARY_ON_WINDOWS) \
3cdd4c
 	$(GNUTLS_LIBS) \
3cdd4c
 	$(NULL)
3cdd4c
-- 
3cdd4c
2.31.1
3cdd4c