Port configure script to C99
Related to: <https://fedoraproject.org/wiki/Changes/PortingToModernC> <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
parent
d7ada2a49a
commit
9c9e04569d
19
jq-configure-c99-1.patch
Normal file
19
jq-configure-c99-1.patch
Normal file
@ -0,0 +1,19 @@
|
||||
Use AC_USE_SYSTEM_EXTENSIONS to build with _GNU_SOURCE (and similar
|
||||
macros on non-GNU systems), to avoid an implicit declaration of the
|
||||
strptime function. This improves compatibility with future compilers
|
||||
which do not support implicit function declarations.
|
||||
|
||||
Submitted upstream: <https://github.com/stedolan/jq/pull/2519>
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 21628bfd5fe99485..ccd494ad7c365839 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -19,6 +19,7 @@ AC_PROG_CPP_WERROR
|
||||
AC_PROG_YACC
|
||||
AC_OBJEXT
|
||||
AC_EXEEXT
|
||||
+AC_USE_SYSTEM_EXTENSIONS
|
||||
LT_INIT([shared static win32-dll])
|
||||
AM_PROG_CC_C_O
|
||||
|
18
jq-configure-c99-2.patch
Normal file
18
jq-configure-c99-2.patch
Normal file
@ -0,0 +1,18 @@
|
||||
The gettimeofday function is declared in <sys/time.h>, not <time.h>,
|
||||
according to POSIX and actual systems.
|
||||
|
||||
Submitted upstream: <https://github.com/stedolan/jq/pull/2519>
|
||||
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index ccd494ad7c365839..c3edaa32756b807c 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -135,7 +135,7 @@ AC_FIND_FUNC([gmtime_r], [c], [#include <time.h>], [0, 0])
|
||||
AC_FIND_FUNC([gmtime], [c], [#include <time.h>], [0])
|
||||
AC_FIND_FUNC([localtime_r], [c], [#include <time.h>], [0, 0])
|
||||
AC_FIND_FUNC([localtime], [c], [#include <time.h>], [0])
|
||||
-AC_FIND_FUNC([gettimeofday], [c], [#include <time.h>], [0, 0])
|
||||
+AC_FIND_FUNC([gettimeofday], [c], [#include <sys/time.h>], [0, 0])
|
||||
AC_CHECK_MEMBER([struct tm.tm_gmtoff], [AC_DEFINE([HAVE_TM_TM_GMT_OFF],1,[Define to 1 if the system has the tm_gmt_off field in struct tm])],
|
||||
[], [[#include <time.h>]])
|
||||
AC_CHECK_MEMBER([struct tm.__tm_gmtoff], [AC_DEFINE([HAVE_TM___TM_GMT_OFF],1,[Define to 1 if the system has the __tm_gmt_off field in struct tm])],
|
7
jq.spec
7
jq.spec
@ -1,6 +1,6 @@
|
||||
Name: jq
|
||||
Version: 1.6
|
||||
Release: 14%{?dist}
|
||||
Release: 15%{?dist}
|
||||
Summary: Command-line JSON processor
|
||||
|
||||
License: MIT and ASL 2.0 and CC-BY and GPLv3
|
||||
@ -10,6 +10,8 @@ Source0: https://github.com/stedolan/jq/releases/download/%{name}-%{versi
|
||||
Patch0: jq-decimal-literal-number.patch
|
||||
# Backport of PR#2400 for RHBZ#2017285
|
||||
Patch1: jq-fix-non-decimal-string.patch
|
||||
Patch2: jq-configure-c99-1.patch
|
||||
Patch3: jq-configure-c99-2.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: flex
|
||||
@ -103,6 +105,9 @@ make check
|
||||
|
||||
|
||||
%changelog
|
||||
* Fri Jan 13 2023 Florian Weimer <fweimer@redhat.com> - 1.6-15
|
||||
- Port configure script to C99
|
||||
|
||||
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 1.6-14
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user