Give zlib the ability to be a module that can be depended on,
in the MODULE_DEPEND() sense.
This commit is contained in:
parent
ed2f7766b0
commit
3410878421
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=130799
8
sys/modules/zlib/Makefile
Normal file
8
sys/modules/zlib/Makefile
Normal file
@ -0,0 +1,8 @@
|
||||
# $FreeBSD$
|
||||
|
||||
.PATH: ${.CURDIR}/../../net
|
||||
|
||||
KMOD= zlib
|
||||
SRCS= zlib.c
|
||||
|
||||
.include <bsd.kmod.mk>
|
@ -57,6 +57,8 @@
|
||||
#include <sys/time.h>
|
||||
#include <sys/systm.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/kernel.h>
|
||||
#include <sys/module.h>
|
||||
# define HAVE_MEMCPY
|
||||
|
||||
#else
|
||||
@ -5380,3 +5382,25 @@ uLong adler32(adler, buf, len)
|
||||
return (s2 << 16) | s1;
|
||||
}
|
||||
/* --- adler32.c */
|
||||
|
||||
#ifdef _KERNEL
|
||||
static int
|
||||
zlib_modevent(module_t mod, int type, void *unused)
|
||||
{
|
||||
switch (type) {
|
||||
case MOD_LOAD:
|
||||
return 0;
|
||||
case MOD_UNLOAD:
|
||||
return 0;
|
||||
}
|
||||
return EINVAL;
|
||||
}
|
||||
|
||||
static moduledata_t zlib_mod = {
|
||||
"zlib",
|
||||
zlib_modevent,
|
||||
0
|
||||
};
|
||||
DECLARE_MODULE(zlib, zlib_mod, SI_SUB_DRIVERS, SI_ORDER_FIRST);
|
||||
MODULE_VERSION(zlib, 1);
|
||||
#endif /* _KERNEL */
|
||||
|
Loading…
Reference in New Issue
Block a user