[2/7] ncurses/nc-cui: musl libc fixes
diff mbox series

Message ID 1518055632-11462-3-git-send-email-brett.grandbois@opengear.com
State Accepted
Headers show
Series
  • Resubmit: Yocto and musl libc fixes, syslinux parser support
Related show

Commit Message

Grandbois, Brett Feb. 8, 2018, 2:07 a.m. UTC
add missing #inlcude <locale.h>

musl libc can segfault with a NULL format string so need to add a
redundant "%s", "" to keep it happy

Signed-off-by: Brett Grandbois <brett.grandbois@opengear.com>
---
 ui/ncurses/nc-cui.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/ui/ncurses/nc-cui.c b/ui/ncurses/nc-cui.c
index f9f8247..ee6df87 100644
--- a/ui/ncurses/nc-cui.c
+++ b/ui/ncurses/nc-cui.c
@@ -24,6 +24,7 @@ 
 #include <ctype.h>
 #include <errno.h>
 #include <stdlib.h>
+#include <locale.h>
 #include <string.h>
 #include <sys/ioctl.h>
 #include <sys/reboot.h>
@@ -1334,7 +1335,7 @@  static struct pmenu *plugin_menu_init(struct cui *cui)
 
 	m = pmenu_init(cui, 2, cui_plugin_menu_exit);
 	m->scr.frame.ltitle = talloc_asprintf(m, _("Petitboot Plugins"));
-	m->scr.frame.rtitle = talloc_asprintf(m, NULL);
+	m->scr.frame.rtitle = talloc_asprintf(m, "%s", "");
 	m->scr.frame.help = talloc_strdup(m,
 		_("Enter=install, e=details, x=exit, h=help"));
 	m->scr.frame.status = talloc_asprintf(m,