10 lines
194 B
C++
10 lines
194 B
C++
#include "LibreTuyaAPI.h"
|
|
|
|
__weak char *strdup(const char *s) {
|
|
size_t len = strlen(s) + 1;
|
|
void *newp = malloc(len);
|
|
if (newp == NULL)
|
|
return NULL;
|
|
return (char *)memcpy(newp, s, len);
|
|
}
|