Skip to contentSkip to conversation

tnftp: Add missing header stdc-predef.h

PATCH New Khem Raj 1 participant 1 message Jan 14, 2022

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 tnftp: Add missing header stdc-predef.h

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.
---
 ...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
meta-networking/recipes-support/tnftp/tnftp/0001-libedit-Include-missing-header-stdc-predef.h.patch new file +31 -0
new file mode 100644
index 0000000000..07a3c739b8
@@ -0,0 +1,31 @@
+From 9f2797d1ab8557b44a1f8d6d4d0b6de368d55e80 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+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 <[email protected]>
+---
+ 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
+
meta-networking/recipes-support/tnftp/tnftp_20210827.bb +1 -0
index 111a63d297..8c5892668d 100644
@@ -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
Signature · 1 line
2.34.1