ref: 87d72e7e8614d96b4f61adae5fb05b0534231c4c dir: /libkern/strdup.c/
#include <lib9.h> char* strdup(char *s) { char *os; os = malloc(strlen(s) + 1); if(os == 0) return 0; return strcpy(os, s); }