Files
patch/compat.h
T
sisungo f67f81b235 initial commit
Signed-off-by: sisungo <[email protected]>
2026-07-07 11:10:21 +08:00

10 lines
212 B
C

#include <stdlib.h>
static inline void *reallocarray(void *p, size_t n, size_t size) {
if (n && size > (size_t)-1 / n) {
errno = ENOMEM;
return NULL;
}
return realloc(p, n * size);
}