From 5268cc891532f428d7a0229e530e14541b1a8d71 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Sun, 10 Sep 2023 14:05:49 -0700 Subject: [PATCH] sharutils: Check for intmax_t using configure fixes ../../sharutils-4.15.2/lib/system.h:45:14: error: typedef redefinition with different types ('long' vs '__intmax_t' (aka 'long long')) 45 | typedef long intmax_t; | ^ Signed-off-by: Khem Raj --- ...re.ac-Check-and-define-intmax_t-type.patch | 32 +++++++++++++++++++ .../sharutils/sharutils_4.15.2.bb | 1 + 2 files changed, 33 insertions(+) create mode 100644 meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch diff --git a/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch b/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch new file mode 100644 index 0000000000..32562a08bc --- /dev/null +++ b/meta-oe/recipes-support/sharutils/sharutils/0001-configure.ac-Check-and-define-intmax_t-type.patch @@ -0,0 +1,32 @@ +From ea6f7a4c22f1b6f28cf426566cccd65eb9a0e9de Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Sun, 10 Sep 2023 13:52:31 -0700 +Subject: [PATCH] configure.ac: Check and define intmax_t type + +If stdint.h or inttypes.h defines the type intmax_t, define HAVE_INTMAX_T. +Otherwise, define intmax_t to the widest signed integer type. + +intmax_t is defined in lib/system.h if system is not providing it but it +needs to be checked by configure for existence first. + +Upstream-Status: Submitted [https://savannah.gnu.org/bugs/index.php?64653] +Signed-off-by: Khem Raj +--- + configure.ac | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/configure.ac b/configure.ac +index 1242cb7..2ccaac9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -72,6 +72,7 @@ AC_HEADER_STAT + AC_HEADER_STDC + AC_STRUCT_TIMEZONE + AC_TYPE_SIZE_T ++AC_TYPE_INTMAX_T + AC_CHECK_FUNCS([fchmod isascii strchr]) + AC_FUNC_CLOSEDIR_VOID + AC_FUNC_FSEEKO +-- +2.42.0 + diff --git a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb index bd2776e1bc..2a16b18288 100644 --- a/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb +++ b/meta-oe/recipes-support/sharutils/sharutils_4.15.2.bb @@ -12,6 +12,7 @@ SRC_URI = "${GNU_MIRROR}/${BPN}/${BP}.tar.gz \ file://0001-Fix-build-with-recent-gettext.patch \ file://0001-Fix-building-with-GCC-10.patch \ file://0002-Do-not-include-lib-md5.c-into-src-shar.c.patch \ + file://0001-configure.ac-Check-and-define-intmax_t-type.patch \ " SRC_URI[md5sum] = "32a51b23e25ad5e6af4b89f228be1800" SRC_URI[sha256sum] = "ee336e68549664e7a19b117adf02edfdeac6307f22e5ba78baca457116914637"