Additional changes to make -Wshadow build on Ubuntu 10.04.
Looks like they defined basename() in string.h and ntohs/htonl are implemented in terms of __bswap16() which is a macro with tmp variables and so one cannot embed one call to ntohs/htons in another. Not good but we workaround this limitation in glibc.
This commit is contained in:
@@ -74,13 +74,13 @@ pidfile_cleanup(void)
|
||||
}
|
||||
|
||||
ROKEN_LIB_FUNCTION void ROKEN_LIB_CALL
|
||||
pidfile(const char *basename)
|
||||
pidfile(const char *bname)
|
||||
{
|
||||
if(pidfile_path != NULL)
|
||||
return;
|
||||
if(basename == NULL)
|
||||
basename = getprogname();
|
||||
pidfile_path = pid_file_write(basename);
|
||||
if(bname == NULL)
|
||||
bname = getprogname();
|
||||
pidfile_path = pid_file_write(bname);
|
||||
#if defined(HAVE_ATEXIT)
|
||||
atexit(pidfile_cleanup);
|
||||
#elif defined(HAVE_ON_EXIT)
|
||||
|
Reference in New Issue
Block a user