diff options
3 files changed, 75 insertions, 2 deletions
diff --git a/meta-oe/recipes-devtools/jq/jq/0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch b/meta-oe/recipes-devtools/jq/jq/0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch new file mode 100644 index 0000000000..e4d6ebb45b --- /dev/null +++ b/meta-oe/recipes-devtools/jq/jq/0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch | |||
@@ -0,0 +1,40 @@ | |||
1 | From 40bbd419ad8d1bd9cbe8b17063c323f8a40ab327 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 6 Sep 2022 09:59:31 -0700 | ||
4 | Subject: [PATCH 1/2] configure: Pass _XOPEN_SOURCE when checking for strptime | ||
5 | |||
6 | Include sys/time.h for gettimeofday since thats where its in glibc | ||
7 | |||
8 | Upstream-Status: Submitted [https://github.com/stedolan/jq/pull/2480] | ||
9 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
10 | --- | ||
11 | configure.ac | 5 ++++- | ||
12 | 1 file changed, 4 insertions(+), 1 deletion(-) | ||
13 | |||
14 | diff --git a/configure.ac b/configure.ac | ||
15 | index a2cd99e..95afe06 100644 | ||
16 | --- a/configure.ac | ||
17 | +++ b/configure.ac | ||
18 | @@ -139,7 +139,10 @@ AC_FUNC_ALLOCA | ||
19 | |||
20 | AC_FIND_FUNC([isatty], [c], [#include <unistd.h>], [0]) | ||
21 | AC_FIND_FUNC([_isatty], [c], [#include <io.h>], [0]) | ||
22 | +OLD_CFLAGS=$CFLAGS | ||
23 | +CFLAGS="$CFLAGS -D_XOPEN_SOURCE" | ||
24 | AC_FIND_FUNC([strptime], [c], [#include <time.h>], [0, 0, 0]) | ||
25 | +CFLAGS=$OLD_CFLAGS | ||
26 | AC_FIND_FUNC([strftime], [c], [#include <time.h>], [0, 0, 0, 0]) | ||
27 | AC_FIND_FUNC([setenv], [c], [#include <stdlib.h>], [0, 0, 0]) | ||
28 | AC_FIND_FUNC([timegm], [c], [#include <time.h>], [0]) | ||
29 | @@ -147,7 +150,7 @@ AC_FIND_FUNC([gmtime_r], [c], [#include <time.h>], [0, 0]) | ||
30 | AC_FIND_FUNC([gmtime], [c], [#include <time.h>], [0]) | ||
31 | AC_FIND_FUNC([localtime_r], [c], [#include <time.h>], [0, 0]) | ||
32 | AC_FIND_FUNC([localtime], [c], [#include <time.h>], [0]) | ||
33 | -AC_FIND_FUNC([gettimeofday], [c], [#include <time.h>], [0, 0]) | ||
34 | +AC_FIND_FUNC([gettimeofday], [c], [#include <sys/time.h>], [0, 0]) | ||
35 | 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])], | ||
36 | [], [[#include <time.h>]]) | ||
37 | 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])], | ||
38 | -- | ||
39 | 2.37.3 | ||
40 | |||
diff --git a/meta-oe/recipes-devtools/jq/jq/0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch b/meta-oe/recipes-devtools/jq/jq/0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch new file mode 100644 index 0000000000..d2f999a728 --- /dev/null +++ b/meta-oe/recipes-devtools/jq/jq/0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch | |||
@@ -0,0 +1,30 @@ | |||
1 | From cda1734bed3b048c01452c798877d05b8c2f4c15 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Tue, 6 Sep 2022 10:00:59 -0700 | ||
4 | Subject: [PATCH 2/2] builtin: Replace _BSD_SOURCE with _DEFAULT_SOURCE | ||
5 | |||
6 | newer glibc has remove _BSD_SOURCE and wants it to be replaced with _DEFAULT_SOURCE | ||
7 | |||
8 | Fixes | ||
9 | /usr/include/features.h:194:3: warning: "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-W#warnings] | ||
10 | warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" | ||
11 | |||
12 | Uptream-Status: Submitted [https://github.com/stedolan/jq/pull/2480] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | src/builtin.c | 2 +- | ||
16 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
17 | |||
18 | diff --git a/src/builtin.c b/src/builtin.c | ||
19 | index 1c6b08c..2a31496 100644 | ||
20 | --- a/src/builtin.c | ||
21 | +++ b/src/builtin.c | ||
22 | @@ -1,4 +1,4 @@ | ||
23 | -#define _BSD_SOURCE | ||
24 | +#define _DEFAULT_SOURCE | ||
25 | #define _GNU_SOURCE | ||
26 | #ifndef __sun__ | ||
27 | # define _XOPEN_SOURCE | ||
28 | -- | ||
29 | 2.37.3 | ||
30 | |||
diff --git a/meta-oe/recipes-devtools/jq/jq_git.bb b/meta-oe/recipes-devtools/jq/jq_git.bb index 8b0218c83e..f69b435e51 100644 --- a/meta-oe/recipes-devtools/jq/jq_git.bb +++ b/meta-oe/recipes-devtools/jq/jq_git.bb | |||
@@ -9,8 +9,11 @@ LICENSE = "MIT" | |||
9 | LIC_FILES_CHKSUM = "file://COPYING;md5=2814b59e00e7918c864fa3b6bbe049b4" | 9 | LIC_FILES_CHKSUM = "file://COPYING;md5=2814b59e00e7918c864fa3b6bbe049b4" |
10 | 10 | ||
11 | PV = "1.6+git${SRCPV}" | 11 | PV = "1.6+git${SRCPV}" |
12 | SRC_URI = "git://github.com/stedolan/jq;protocol=https;branch=master" | 12 | SRC_URI = "git://github.com/stedolan/jq;protocol=https;branch=master \ |
13 | SRCREV = "a9f97e9e61a910a374a5d768244e8ad63f407d3e" | 13 | file://0001-configure-Pass-_XOPEN_SOURCE-when-checking-for-strpt.patch \ |
14 | file://0002-builtin-Replace-_BSD_SOURCE-with-_DEFAULT_SOURCE.patch \ | ||
15 | " | ||
16 | SRCREV = "cff5336ec71b6fee396a95bb0e4bea365e0cd1e8" | ||
14 | S = "${WORKDIR}/git" | 17 | S = "${WORKDIR}/git" |
15 | 18 | ||
16 | inherit autotools-brokensep | 19 | inherit autotools-brokensep |