Skip to contentSkip to conversation

ncurses: Fix configure tests for exit and mbstate_t

PATCH In review Khem Raj 2 participants 3 messages Aug 30, 2022 – Aug 31, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 ncurses: Fix configure tests for exit and mbstate_t

These tests do not include needed headers which results in warnings and as errors when using -Werror or latest clang e.g.

---
 .../ncurses/files/exit_prototype.patch        | 22 +++++++++++++++++++
 .../ncurses/ncurses_6.3+20220423.bb           |  1 +
 2 files changed, 23 insertions(+)
 create mode 100644 meta/recipes-core/ncurses/files/exit_prototype.patch
meta/recipes-core/ncurses/files/exit_prototype.patch new file +22 -0
new file mode 100644
index 0000000000..791421a338
@@ -0,0 +1,22 @@
+Add needed headers for including mbstate_t and exit()
+
+Upstream-Status: Inappropriate [Reconfigure will solve it]
+Signed-off-by: Khem Raj <[email protected]>
+--- a/configure
++++ b/configure
+@@ -3422,6 +3422,7 @@ rm -f "conftest.$ac_objext" "conftest.$a
+   cat >"conftest.$ac_ext" <<_ACEOF
+ #line 3423 "configure"
+ #include "confdefs.h"
++#include <stdlib.h>
+ $ac_declaration
+ int
+ main (void)
+@@ -12997,6 +12998,7 @@ cat >"conftest.$ac_ext" <<_ACEOF
+ #include <stdlib.h>
+ #include <stdarg.h>
+ #include <stdio.h>
++#include <wchar.h>
+ #ifdef HAVE_LIBUTF8_H
+ #include <libutf8.h>
+ #endif
meta/recipes-core/ncurses/ncurses_6.3+20220423.bb +1 -0
index 9fba5b584b..ca5fa32572 100644
@@ -3,6 +3,7 @@ require ncurses.inc
 SRC_URI += "file://0001-tic-hang.patch \
            file://0002-configure-reproducible.patch \
            file://0003-gen-pkgconfig.in-Do-not-include-LDFLAGS-in-generated.patch \
+           file://exit_prototype.patch \
            "
 # commit id corresponds to the revision in package version
 SRCREV = "20db1fb41ec91cd8a1f528e770362092c5403378"
Signature · 1 line
2.37.3
#1 lore raw

meta/recipes-core/ncurses/files/exit_prototype.patch line 4

Quoted 4 lines · Khem Raj
meta/recipes-core/ncurses/files/exit_prototype.patch new file +4 -0
+Add needed headers for including mbstate_t and exit()
+
+Upstream-Status: Inappropriate [Reconfigure will solve it]
+Signed-off-by: Khem Raj <[email protected]>

This would benefit from a better explanation: why isn't configure.ac being patched? What is 'reconfigure' and how it will solve the problem, and when will it happen?

Alex

author
#2 lore raw
Quoted 10 lines · Alexander Kanavin

meta/recipes-core/ncurses/files/exit_prototype.patch line 4

Quoted 4 lines · Khem Raj
meta/recipes-core/ncurses/files/exit_prototype.patch new file +4 -0
+Add needed headers for including mbstate_t and exit()
+
+Upstream-Status: Inappropriate [Reconfigure will solve it]
+Signed-off-by: Khem Raj <[email protected]>

This would benefit from a better explanation: why isn't configure.ac being patched? What is 'reconfigure' and how it will solve the problem, and when will it happen?

its obvious in recipe, do_configure does not regenerate configure script like most of autotools recipes do.
autoreconf will use new macros when regenerating the configure script.

Quoted 2 lines

Alex