From 4b8761304540894df455fd6d3ca91f8f3e89141d Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Dec 19 2022 13:50:46 +0000 Subject: Port configure script to C99 Related to: --- diff --git a/bacula-configure-c99.patch b/bacula-configure-c99.patch new file mode 100644 index 0000000..6b71616 --- /dev/null +++ b/bacula-configure-c99.patch @@ -0,0 +1,38 @@ +autoconf: Do not call exit in the getaddrinfo check + +The exit function is not declared in this context, so the check +will always fail with compilers which do not accept implicit function +declarations. Change the return type of main to int and return +directly from main instead. + +Submitted upstream: + +diff --git a/autoconf/configure.in b/autoconf/configure.in +index 56cb94e9a904b47d..937ad330fb68d77b 100644 +--- a/autoconf/configure.in ++++ b/autoconf/configure.in +@@ -2585,7 +2585,7 @@ AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo, + #include + #include + +- void main(void) { ++ int main(void) { + struct addrinfo hints, *ai; + int error; + +@@ -2594,12 +2594,12 @@ AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo, + hints.ai_socktype = SOCK_STREAM; + error = getaddrinfo("127.0.0.1", NULL, &hints, &ai); + if (error) { +- exit(1); ++ return 1; + } + if (ai->ai_addr->sa_family != AF_INET) { +- exit(1); ++ return 1; + } +- exit(0); ++ return 0; + } + ],[ + ac_cv_working_getaddrinfo="yes" diff --git a/bacula.spec b/bacula.spec index 4f2b7bb..7738fa0 100644 --- a/bacula.spec +++ b/bacula.spec @@ -3,7 +3,7 @@ Name: bacula Version: 13.0.1 -Release: 4%{?dist} +Release: 5%{?dist} Summary: Cross platform network backup for Linux, Unix, Mac and Windows # See LICENSE for details License: AGPLv3 with exceptions @@ -42,6 +42,7 @@ Patch8: %{name}-docker-plugin.patch # http://bugs.bacula.org/view.php?id=2084 Patch9: %{name}-autoconf.patch Patch10: %{name}-scripts.patch +Patch11: bacula-configure-c99.patch BuildRequires: desktop-file-utils BuildRequires: perl-generators @@ -642,6 +643,9 @@ exit 0 %{_libdir}/nagios/plugins/check_bacula %changelog +* Mon Dec 19 2022 Florian Weimer - 13.0.1-5 +- Port configure script to C99 + * Tue Nov 29 2022 Simone Caronni - 13.0.1-4 - Fix isworm script.