#define _BSD_SOURCE #include #include #include #ifdef __wasilibc_unmodified_upstream // wasi-libc doesn't support catgets yet #include #endif #define V(p) be32toh(*(uint32_t *)(p)) int catclose (nl_catd catd) { #ifdef __wasilibc_unmodified_upstream // wasi-libc doesn't support catgets yet char *map = (char *)catd; munmap(map, V(map+8)+20); #endif return 0; }