Bugzilla – Attachment 1816 Details for
Bug 1738
openbsd-compat wants xstrdup but it's in libssh.a
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
provide provde xstrdup for bsd-misc.c
openssh-5.4_p1-xstrdup.patch (text/plain), 841 bytes, created by
Alan Hourihane
on 2010-03-23 22:46:08 AEDT
(
hide
)
Description:
provide provde xstrdup for bsd-misc.c
Filename:
MIME Type:
Creator:
Alan Hourihane
Created:
2010-03-23 22:46:08 AEDT
Size:
841 bytes
patch
obsolete
>--- openbsd-compat/bsd-misc.c.old 2010-03-23 10:20:28.000000000 +0000 >+++ openbsd-compat/bsd-misc.c 2010-03-23 10:21:07.000000000 +0000 >@@ -36,6 +36,21 @@ > char *__progname; > #endif > >+/* libssh.a has xstrdup but it's link order won't link it in for static libs. >+ * Therefore we have a private copy here. >+ */ >+static char * >+_xstrdup(const char *str) >+{ >+ size_t len; >+ char *cp; >+ >+ len = strlen(str) + 1; >+ cp = xmalloc(len); >+ strlcpy(cp, str, len); >+ return cp; >+} >+ > /* > * NB. duplicate __progname in case it is an alias for argv[0] > * Otherwise it may get clobbered by setproctitle() >@@ -45,7 +60,7 @@ > #ifdef HAVE___PROGNAME > extern char *__progname; > >- return xstrdup(__progname); >+ return _xstrdup(__progname); > #else > char *p; > >@@ -57,7 +72,7 @@ > else > p++; > >- return (xstrdup(p)); >+ return (_xstrdup(p)); > #endif > } >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 1738
:
1816
|
1817