fix FTBFS
This commit is contained in:
parent
d0a3ac2d26
commit
913879a64e
26
0001-Fixed-missed-include-stdlib.h-see-305.patch
Normal file
26
0001-Fixed-missed-include-stdlib.h-see-305.patch
Normal file
@ -0,0 +1,26 @@
|
||||
From c042a6895fe6f663d4bcb8c27d1c7b34fbd68b48 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Pevzner <pzz@apevzner.com>
|
||||
Date: Sat, 2 Dec 2023 21:49:40 +0300
|
||||
Subject: [PATCH 1/2] Fixed missed #include <stdlib.h> (see #305)
|
||||
|
||||
This code used to compile on everywhere, but explicit #include <stdlib.h>
|
||||
was actually missed. Seems that sometimes it can cause problems.
|
||||
---
|
||||
airscan-xml.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/airscan-xml.c b/airscan-xml.c
|
||||
index f376f31..5071ca9 100644
|
||||
--- a/airscan-xml.c
|
||||
+++ b/airscan-xml.c
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "airscan.h"
|
||||
|
||||
#include <fnmatch.h>
|
||||
+#include <stdlib.h>
|
||||
|
||||
#include <libxml/parser.h>
|
||||
#include <libxml/tree.h>
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
From 144e7d4187c73566ffc2780ac91ab7e1826826e0 Mon Sep 17 00:00:00 2001
|
||||
From: Alexander Pevzner <pzz@apevzner.com>
|
||||
Date: Sat, 2 Dec 2023 22:29:55 +0300
|
||||
Subject: [PATCH 2/2] Fixed build with recent versions of libxml2 (fixes #305)
|
||||
|
||||
libxml2 recently changed a prototype of the xmlStructuredErrorFunc callback,
|
||||
adding const modifier to the second parameter.
|
||||
|
||||
Adding an explicit cast seems to fix the problem (but I will not be surprised, if
|
||||
this fix will not work equally well on all distros).
|
||||
|
||||
Found for a first time and fixed on Arch linux on about 2 Dec 2023 (Arch is rolling
|
||||
release, so there is no explicit release number)
|
||||
---
|
||||
airscan-xml.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/airscan-xml.c b/airscan-xml.c
|
||||
index 5071ca9..10f290c 100644
|
||||
--- a/airscan-xml.c
|
||||
+++ b/airscan-xml.c
|
||||
@@ -124,7 +124,7 @@ xml_rd_parse (xmlDoc **doc, const char *xml_text, size_t xml_len)
|
||||
goto DONE;
|
||||
}
|
||||
|
||||
- ctxt->sax->serror = xml_rd_error_callback;
|
||||
+ ctxt->sax->serror = (xmlStructuredErrorFunc) xml_rd_error_callback;
|
||||
|
||||
/* Parse the document */
|
||||
if (xmlCtxtResetPush(ctxt, xml_text, xml_len, NULL, NULL)) {
|
||||
--
|
||||
2.43.0
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
|
||||
Name: sane-airscan
|
||||
Version: 0.99.27
|
||||
Release: 10%{?dist}
|
||||
Release: 11%{?dist}
|
||||
Summary: SANE backend for AirScan (eSCL) and WSD document scanners
|
||||
# SANE related source and header files - GPL 2.0+ with SANE exception
|
||||
# http_parser.c/.h - MIT
|
||||
@ -15,6 +15,10 @@ URL: https://github.com/alexpevzner/sane-airscan
|
||||
Source: %{URL}/archive/%{version}/%{name}-%{version}.tar.gz
|
||||
|
||||
# backported from upstream
|
||||
# https://github.com/alexpevzner/sane-airscan/commit/c042a6895 - missing stdlib
|
||||
Patch001: 0001-Fixed-missed-include-stdlib.h-see-305.patch
|
||||
# https://github.com/alexpevzner/sane-airscan/commit/144e7d4187 - fix warning by conversion
|
||||
Patch002: 0002-Fixed-build-with-recent-versions-of-libxml2-fixes-30.patch
|
||||
|
||||
|
||||
# needed for querying and getting mDNS messages from local network
|
||||
@ -98,6 +102,9 @@ rm -f %{buildroot}%{_libdir}/sane/libsane-airscan.so
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Dec 08 2023 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.27-11
|
||||
- fix FTBFS
|
||||
|
||||
* Wed Aug 30 2023 Zdenek Dohnal <zdohnal@redhat.com> - 0.99.27-10
|
||||
- applied accepted license exception - SANE-exception
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user