mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-02-07 15:03:34 +00:00
15 lines
242 B
C
15 lines
242 B
C
|
#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;
|
||
|
}
|