diff options
| author | 2011-07-07 02:57:24 +0000 | |
|---|---|---|
| committer | 2011-07-07 02:57:24 +0000 | |
| commit | 6141cf33003a8028b4211fd84fea107eabedd229 (patch) | |
| tree | 19a2626bd8fbec2f1a9e924a7c92c79d6995f586 /sys/lib/libz/zopenbsd.c | |
| parent | Missed in previous: ypldap.conf(5) is installed now, remove optional. (diff) | |
| download | wireguard-openbsd-6141cf33003a8028b4211fd84fea107eabedd229.tar.xz wireguard-openbsd-6141cf33003a8028b4211fd84fea107eabedd229.zip | |
Replace the cruddy old sys/net/zlib.[ch]. We now use the sys/lib/libz
code. Missing chunks of the API are imported from the libc version,
with a few #ifdef's to port it into the kernel environment.
The bootblocks already used the newer code, and should encounter no
surprises since there are so few changes to the existing files. In
the kernel, ipcomp and kernel ppp are changed to the new API.
ipcomp has been tested.
ok tedu the brave
Diffstat (limited to 'sys/lib/libz/zopenbsd.c')
| -rw-r--r-- | sys/lib/libz/zopenbsd.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sys/lib/libz/zopenbsd.c b/sys/lib/libz/zopenbsd.c new file mode 100644 index 00000000000..b74c4bc6bed --- /dev/null +++ b/sys/lib/libz/zopenbsd.c @@ -0,0 +1,25 @@ +#include <sys/types.h> +#include <sys/malloc.h> +#include <lib/libz/zutil.h> + +/* + * Space allocation and freeing routines for use by zlib routines. + */ +void * +zcalloc(notused, items, size) + void *notused; + u_int items, size; +{ + void *ptr; + + ptr = malloc(items * size, M_DEVBUF, M_NOWAIT); + return ptr; +} + +void +zcfree(notused, ptr) + void *notused; + void *ptr; +{ + free(ptr, M_DEVBUF); +} |
