--- embedaddon/sudo/compat/strsignal.c 2012/02/21 16:23:02 1.1 +++ embedaddon/sudo/compat/strsignal.c 2014/06/15 16:12:54 1.1.1.4 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2009-2011 Todd C. Miller + * Copyright (c) 2009-2013 Todd C. Miller * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -16,24 +16,26 @@ #include +#ifndef HAVE_STRSIGNAL + #include #include #include -#include "missing.h" - #define DEFAULT_TEXT_DOMAIN "sudo" -#include "gettext.h" +#include "gettext.h" /* must be included before missing.h */ +#include "missing.h" + #if defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST == 1 -# define my_sys_siglist sys_siglist +# define sudo_sys_siglist sys_siglist #elif defined(HAVE_DECL__SYS_SIGLIST) && HAVE_DECL__SYS_SIGLIST == 1 -# define my_sys_siglist _sys_siglist +# define sudo_sys_siglist _sys_siglist #elif defined(HAVE_DECL___SYS_SIGLIST) && HAVE_DECL___SYS_SIGLIST == 1 -# define my_sys_siglist __sys_siglist +# define sudo_sys_siglist __sys_siglist #else -extern const char *const my_sys_siglist[NSIG]; +extern const char *const sudo_sys_siglist[NSIG]; #endif /* @@ -42,7 +44,9 @@ extern const char *const my_sys_siglist[NSIG]; char * strsignal(int signo) { - if (signo > 0 && signo < NSIG) - return (char *)my_sys_siglist[signo]; + if (signo > 0 && signo < NSIG && sudo_sys_siglist[signo] != NULL) + return (char *)sudo_sys_siglist[signo]; + /* XXX - should be "Unknown signal: %d" */ return _("Unknown signal"); } +#endif /* HAVE_STRSIGNAL */