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 <jwkozac...@gmail.com> --- Makefile | 4 ++-- libc/misc/basename.c | 14 -------------- libc/network/h_errno.c | 9 --------- 3 files changed, 2 insertions(+), 25 deletions(-) delete mode 100644 libc/misc/basename.c delete mode 100644 libc/network/h_errno.c diff --git a/Makefile b/Makefile index 5d54c6da..62e832c7 100644 --- 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 deleted file mode 100644 index 5713598a..00000000 --- a/libc/misc/basename.c +++ /dev/null @@ -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 deleted file mode 100644 index c527583f..00000000 --- a/libc/network/h_errno.c +++ /dev/null @@ -1,9 +0,0 @@ -#include <netdb.h> - -#undef h_errno -int h_errno; - -int *__h_errno_location(void) -{ - return &h_errno; -} -- 2.25.1 -- 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 osv-dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/osv-dev/20200730162541.7644-1-jwkozaczuk%40gmail.com.