meta: move photon/libc to root

This commit is contained in:
2026-02-08 20:45:25 +00:00
parent f00e74260d
commit 345a37962e
140 changed files with 0 additions and 0 deletions

11
libc/string/strdup.c Normal file
View File

@@ -0,0 +1,11 @@
#include <string.h>
#include <stdlib.h>
char *strdup(const char *str)
{
size_t len = strlen(str);
char *out = malloc(len + 1);
memcpy(out, str, len);
out[len] = 0;
return out;
}