diff options
Diffstat (limited to 'src/locale/catclose.c')
-rw-r--r-- | src/locale/catclose.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/locale/catclose.c b/src/locale/catclose.c index 02cd3e5c..54e24dd2 100644 --- a/src/locale/catclose.c +++ b/src/locale/catclose.c @@ -1,6 +1,14 @@ +#define _BSD_SOURCE #include <nl_types.h> +#include <stdint.h> +#include <endian.h> +#include <sys/mman.h> + +#define V(p) be32toh(*(uint32_t *)(p)) int catclose (nl_catd catd) { + char *map = (char *)catd; + munmap(map, V(map+8)+20); return 0; } |