diff --git a/libfprint/nbis/fix-musl-build.patch b/libfprint/nbis/fix-musl-build.patch new file mode 100644 index 00000000..e27a8fa7 --- /dev/null +++ b/libfprint/nbis/fix-musl-build.patch @@ -0,0 +1,31 @@ +From 2584d440afc87d463cb8dc809d48c660e091c2c4 Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Thu, 23 Jun 2022 05:57:46 +0100 +Subject: [PATCH] nbis: fix build on musl + +Drop re-definition of stderr. There's no need for this anywhere +(including glibc). This breaks in particular on musl because +stderr (and stdin) are both const, and macros unlike in glibc. + +Bug: https://bugs.gentoo.org/853811 +--- + nbis/include/bozorth.h | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/nbis/include/bozorth.h b/nbis/include/bozorth.h +index a705da98..fd8975bf 100644 +--- a/nbis/include/bozorth.h ++++ b/nbis/include/bozorth.h +@@ -217,8 +217,6 @@ struct xytq_struct { + /**************************************************************************/ + /* Globals supporting command line options */ + extern int verbose_threshold; +-/* Global supporting error reporting */ +-extern FILE *stderr; + + /**************************************************************************/ + /* In: BZ_GBLS.C */ +-- +GitLab + + diff --git a/libfprint/nbis/include/bozorth.h b/libfprint/nbis/include/bozorth.h index a705da98..fd8975bf 100644 --- a/libfprint/nbis/include/bozorth.h +++ b/libfprint/nbis/include/bozorth.h @@ -217,8 +217,6 @@ struct xytq_struct { /**************************************************************************/ /* Globals supporting command line options */ extern int verbose_threshold; -/* Global supporting error reporting */ -extern FILE *stderr; /**************************************************************************/ /* In: BZ_GBLS.C */ diff --git a/libfprint/nbis/update-from-nbis.sh b/libfprint/nbis/update-from-nbis.sh index f7ec0eeb..9bbaf790 100755 --- a/libfprint/nbis/update-from-nbis.sh +++ b/libfprint/nbis/update-from-nbis.sh @@ -198,3 +198,6 @@ patch -p0 < fix-scan-build-reports.patch # Add pass to remove perimeter points patch -p0 < remove-perimeter-pts.patch + +# Fix build on musl by dropping unnecessary redeclaration of stderr +patch -p0 < fix-musl-build.patch