Skip to content

Commit

Permalink
ncurses/nc-cui: musl libc fixes
Browse files Browse the repository at this point in the history
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>
Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
  • Loading branch information
Brett Grandbois authored and sammj committed Feb 7, 2018
1 parent 8f09986 commit 44ab15f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ui/ncurses/nc-cui.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 44ab15f

Please sign in to comment.