diff --git a/dfu-programmer-c99.patch b/dfu-programmer-c99.patch new file mode 100644 index 0000000..ad03798 --- /dev/null +++ b/dfu-programmer-c99.patch @@ -0,0 +1,16 @@ +Include for the malloc function. + +Submitted upstream: + +diff --git a/src/atmel.c b/src/atmel.c +index 4ea794d17f65d8d0..491bbb16706e65a8 100644 +--- a/src/atmel.c ++++ b/src/atmel.c +@@ -19,6 +19,7 @@ + */ + + #include ++#include + #include + #include + #include diff --git a/dfu-programmer-configure-c99.patch b/dfu-programmer-configure-c99.patch new file mode 100644 index 0000000..cff5b17 --- /dev/null +++ b/dfu-programmer-configure-c99.patch @@ -0,0 +1,28 @@ +This is merely a kludge to fix a configure.ac bug: + + Missing #include in AC_FUNC_MEMCMP + + + Misuse of autoconf features in configure.ac causes multiple problems + + +We cannot re-run autoconf with the current Fedora autoconf version, +and this patch serves as a reminder that something has to be done +to fix configure.ac to address this AC_FUNC_MEMCMP issue. The +next upstream release has fixed this by removing old libusb support: + + Remove libusb0 support + + +diff --git a/configure b/configure +index 77c9bef30edcbd2e..d4fcdf174a7fcd14 100755 +--- a/configure ++++ b/configure +@@ -4596,6 +4596,7 @@ else + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + $ac_includes_default ++#include + int + main () + { diff --git a/dfu-programmer.spec b/dfu-programmer.spec index 83062db..7089578 100644 --- a/dfu-programmer.spec +++ b/dfu-programmer.spec @@ -1,11 +1,13 @@ Name: dfu-programmer Version: 0.7.2 -Release: 11%{?dist} +Release: 12%{?dist} Summary: A Device Firmware Update based USB programmer for Atmel chips License: GPLv2+ URL: http://dfu-programmer.github.io/ Source0: https://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.gz +Patch0: dfu-programmer-configure-c99.patch +Patch1: dfu-programmer-c99.patch BuildRequires: gcc BuildRequires: pkgconfig(libusb-1.0) >= 1.0.0 @@ -18,7 +20,7 @@ bootloader supporting ISP. This is a mostly Device Firmware Update Atmel chips with USB support. %prep -%setup -q +%autosetup -p1 %build %configure @@ -34,6 +36,9 @@ Atmel chips with USB support. %{_mandir}/man1/%{name}.1* %changelog +* Mon Dec 12 2022 Florian Weimer - 0.7.2-12 +- Port to C99 (#2152666) + * Thu Jul 21 2022 Fedora Release Engineering - 0.7.2-11 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild