Current 6.8 git build issues on HP-UX
Darren Tucker
dtucker at zip.com.au
Wed Feb 25 09:20:01 AEDT 2015
On Wed, Feb 25, 2015 at 09:13:22AM +1100, Darren Tucker wrote:
> On Wed, Feb 25, 2015 at 09:04:57AM +1100, Darren Tucker wrote:
> > On Tue, Feb 24, 2015 at 12:11:16PM -0800, Kevin Brott wrote:
> > > ld: Unsatisfied symbol "xstrdup" in file
> > > openbsd-compat//libopenbsd-compat.a[bsd-misc.o]
> >
> > How about removing the dependency on xmalloc? eg (untested):
>
> Shoulda tested it. Now one that will compile:
Sigh. And now the right patch from the tree that compiled.
(djm: I get the idea :-)
diff --git a/openbsd-compat/bsd-misc.c b/openbsd-compat/bsd-misc.c
index 65e8003..f7be415 100644
--- a/openbsd-compat/bsd-misc.c
+++ b/openbsd-compat/bsd-misc.c
@@ -31,8 +31,6 @@
#include <time.h>
#include <unistd.h>
-#include "xmalloc.h"
-
#ifndef HAVE___PROGNAME
char *__progname;
#endif
@@ -43,13 +41,12 @@ char *__progname;
*/
char *ssh_get_progname(char *argv0)
{
+ char *p, *q;
#ifdef HAVE___PROGNAME
extern char *__progname;
- return xstrdup(__progname);
+ p = __progname;
#else
- char *p;
-
if (argv0 == NULL)
return ("unknown"); /* XXX */
p = strrchr(argv0, '/');
@@ -57,9 +54,12 @@ char *ssh_get_progname(char *argv0)
p = argv0;
else
p++;
-
- return (xstrdup(p));
#endif
+ if ((q = strdup(p)) == NULL) {
+ perror("strdup");
+ exit(1);
+ }
+ return q;
}
#ifndef HAVE_SETLOGIN
--
Darren Tucker (dtucker at zip.com.au)
GPG key 8FF4FA69 / D9A3 86E9 7EEE AF4B B2D4 37C9 C982 80C7 8FF4 FA69
Good judgement comes with experience. Unfortunately, the experience
usually comes from bad judgement.
More information about the openssh-unix-dev
mailing list