[meta-networking] tnftp: Add missing header stdc-predef.h

Message ID 20220114172715.827811-1-raj.khem@gmail.com
State New
Headers show
Series [meta-networking] tnftp: Add missing header stdc-predef.h | expand

Commit Message

Khem Raj Jan. 14, 2022, 5:27 p.m. UTC
musl highlights this problem

Fixes
| ../../tnftp-20210827/libedit/chartype.h:47:3: error: wchar_t must store ISO 10646 characters
|         #error wchar_t must store ISO 10646 characters                                             |          ^
| 1 error generated.

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Yi Zhao <yi.zhao@windriver.com>
---
 ...Include-missing-header-stdc-predef.h.patch | 31 +++++++++++++++++++
 .../recipes-support/tnftp/tnftp_20210827.bb   |  1 +
 2 files changed, 32 insertions(+)
 create mode 100644 meta-networking/recipes-support/tnftp/tnftp/0001-libedit-Include-missing-header-stdc-predef.h.patch

Patch

diff --git a/meta-networking/recipes-support/tnftp/tnftp/0001-libedit-Include-missing-header-stdc-predef.h.patch b/meta-networking/recipes-support/tnftp/tnftp/0001-libedit-Include-missing-header-stdc-predef.h.patch
new file mode 100644
index 0000000000..07a3c739b8
--- /dev/null
+++ b/meta-networking/recipes-support/tnftp/tnftp/0001-libedit-Include-missing-header-stdc-predef.h.patch
@@ -0,0 +1,31 @@ 
+From 9f2797d1ab8557b44a1f8d6d4d0b6de368d55e80 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Fri, 14 Jan 2022 09:22:59 -0800
+Subject: [PATCH] libedit: Include missing header stdc-predef.h
+
+__STDC_ISO_10646__ is defined in stdc-predef.h instead of expecting
+every other file including this header, add it here
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ libedit/chartype.h | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/libedit/chartype.h b/libedit/chartype.h
+index 319be30..2d3e20c 100644
+--- a/libedit/chartype.h
++++ b/libedit/chartype.h
+@@ -30,6 +30,9 @@
+ #ifndef _h_chartype_f
+ #define _h_chartype_f
+ 
++/*  for __STDC_ISO_10646__ */
++#include <stdc-predef.h>
++
+ /* Ideally we should also test the value of the define to see if it
+  * supports non-BMP code points without requiring UTF-16, but nothing
+  * seems to actually advertise this properly, despite Unicode 3.1 having
+-- 
+2.34.1
+
diff --git a/meta-networking/recipes-support/tnftp/tnftp_20210827.bb b/meta-networking/recipes-support/tnftp/tnftp_20210827.bb
index 111a63d297..8c5892668d 100644
--- a/meta-networking/recipes-support/tnftp/tnftp_20210827.bb
+++ b/meta-networking/recipes-support/tnftp/tnftp_20210827.bb
@@ -15,6 +15,7 @@  LICENSE = "BSD-4-Clause"
 DEPENDS = "ncurses"
 
 SRC_URI = "ftp://ftp.netbsd.org/pub/NetBSD/misc/tnftp/${BPN}-${PV}.tar.gz \
+           file://0001-libedit-Include-missing-header-stdc-predef.h.patch \
 "
 
 inherit autotools update-alternatives pkgconfig