From: Waldemar Kozaczuk <[email protected]> Committer: Nadav Har'El <[email protected]> Branch: master
libc: replace two more files with the musl copies This patch removes two more files from libc directory that are pretty much identical to their musl equivalent: ``` DIFF: [/misc/basename.c] 2d1 < #include <libgen.h> DIFF: [/network/h_errno.c] 8c8 < return &h_errno; --- > return &h_errno; ``` Signed-off-by: Waldemar Kozaczuk <[email protected]> Message-Id: <[email protected]> --- diff --git a/Makefile b/Makefile --- a/Makefile +++ b/Makefile @@ -1305,7 +1305,7 @@ $(out)/musl/src/math/llroundf.o: conf-opt := $(conf-opt) -O0 $(out)/musl/src/math/llroundl.o: conf-opt := $(conf-opt) -O0 musl += misc/a64l.o -libc += misc/basename.o +musl += misc/basename.o musl += misc/dirname.o libc += misc/error.o libc += misc/ffs.o @@ -1367,7 +1367,7 @@ musl += network/proto.o libc += network/if_indextoname.o libc += network/if_nametoindex.o libc += network/gai_strerror.o -libc += network/h_errno.o +musl += network/h_errno.o musl += network/getservbyname_r.o musl += network/getservbyname.o musl += network/getservbyport_r.o diff --git a/libc/misc/basename.c b/libc/misc/basename.c --- a/libc/misc/basename.c +++ b/libc/misc/basename.c @@ -1,14 +0,0 @@ -#include <string.h> -#include "libc.h" - -char *basename(char *s) -{ - size_t i; - if (!s || !*s) return "."; - i = strlen(s)-1; - for (; i&&s[i]=='/'; i--) s[i] = 0; - for (; i&&s[i-1]!='/'; i--); - return s+i; -} - -weak_alias(basename, __xpg_basename); diff --git a/libc/network/h_errno.c b/libc/network/h_errno.c --- a/libc/network/h_errno.c +++ b/libc/network/h_errno.c @@ -1,9 +0,0 @@ -#include <netdb.h> - -#undef h_errno -int h_errno; - -int *__h_errno_location(void) -{ - return &h_errno; -} -- You received this message because you are subscribed to the Google Groups "OSv Development" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/000000000000e3d10305abacf621%40google.com.
