aboutsummaryrefslogtreecommitdiff
path: root/src/locale/catclose.c
blob: 9d6891f72b8a7b7009946960ec49a4a4bde674b1 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#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;
}


#ifdef TEST
int
main(void) {
	return 0;
}
#endif