From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
Branch: master

libc: replace __strndup.c by adding entry to aliases.ld

Signed-off-by: Waldemar Kozaczuk <[email protected]>

---
diff --git a/Makefile b/Makefile
--- a/Makefile
+++ b/Makefile
@@ -1592,7 +1592,6 @@ libc += string/__strncat_chk.o
 musl += string/strncmp.o
 musl += string/strncpy.o
 libc += string/__strncpy_chk.o
-libc += string/__strndup.o
 musl += string/strndup.o
 musl += string/strnlen.o
 musl += string/strpbrk.o
diff --git a/libc/aliases.ld b/libc/aliases.ld
--- a/libc/aliases.ld
+++ b/libc/aliases.ld
@@ -29,3 +29,4 @@ __mbrlen = mbrlen;
 
 /* string */
 __strtok_r = strtok_r;
+__strndup = strndup;
diff --git a/libc/string/__strndup.c b/libc/string/__strndup.c
--- a/libc/string/__strndup.c
+++ b/libc/string/__strndup.c
@@ -1,8 +0,0 @@
-#include <stdlib.h>
-#include <string.h>
-#include "libc.h"
-
-char *__strndup(const char *s, size_t n)
-{
-       return strndup(s, n);
-}

-- 
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/000000000000e3006705accfb7c2%40google.com.

Reply via email to