blob: 362ba5948fa883565198ff951b7d9b2be47eb7f8 [file] [log] [blame]
This function overshadows the one from libc on Solaris, and guess what,
is hence never called. Since the original one has an entirely different
contract, it results in unconditional segfaults lateron, so always use
the internal copy as it's small enough not to care.
--- ssmtp.c
+++ ssmtp.c
@@ -223,11 +223,10 @@
exit(1);
}
-#ifndef _GNU_SOURCE
/*
-basename() -- Return last element of path
+xbasename() -- Return last element of path
*/
-char *basename(char *str)
+char *xbasename(char *str)
{
char *p;
@@ -238,7 +237,6 @@
return(strdup(p));
}
-#endif /* _GNU_SOURCE */
/*
strip_pre_ws() -- Return pointer to first non-whitespace character
@@ -2058,7 +2056,7 @@
(void)signal(SIGTTOU, SIG_IGN);
/* Set the globals */
- prog = basename(argv[0]);
+ prog = xbasename(argv[0]);
hostname = xgethostname();