minimal plan9port to cross-build Jehanne

This commit is contained in:
2021-12-22 10:35:45 +01:00
commit c43269a19e
245 changed files with 26213 additions and 0 deletions

16
lib/lib9/strdup.c Normal file
View File

@ -0,0 +1,16 @@
#include <u.h>
#include <libc.h>
char*
strdup(char *s)
{
char *t;
int l;
l = strlen(s);
t = malloc(l+1);
if(t == nil)
return nil;
memmove(t, s, l+1);
return t;
}