From f4881a37c819dbeeb3d7db25a3c7b50bd8aca170 Mon Sep 17 00:00:00 2001 From: Norman Feske Date: Tue, 21 Aug 2012 17:14:52 +0200 Subject: [PATCH] libc_noux: fix compile warnings --- ports/src/lib/libc_noux/plugin.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/ports/src/lib/libc_noux/plugin.cc b/ports/src/lib/libc_noux/plugin.cc index d5ecfbbd6..371db8f71 100644 --- a/ports/src/lib/libc_noux/plugin.cc +++ b/ports/src/lib/libc_noux/plugin.cc @@ -38,6 +38,7 @@ #include #include #include +#include /* libc-internal includes */ #include @@ -103,14 +104,16 @@ extern "C" struct passwd *getpwuid(uid_t uid) static char shell[Noux::Sysio::MAX_SHELL_LEN]; static char home[Noux::Sysio::MAX_HOME_LEN]; + static char *empty = strdup(""); + static struct passwd pw = { /* .pw_name = */ name, - /* .pw_passwd = */ "", + /* .pw_passwd = */ empty, /* .pw_uid = */ 0, /* .pw_gid = */ 0, /* .pw_change = */ 0, - /* .pw_class = */ "", - /* .pw_gecos = */ "", + /* .pw_class = */ empty, + /* .pw_gecos = */ empty, /* .pw_dir = */ home, /* .pw_shell = */ shell, /* .pw_expire = */ 0,