On Wed, Aug 08, 2007 at 11:23:25AM -0500, Biks N wrote:
> I am new to FreeBSD kernel programming and I am trying to use userland
> library (zlib) in FreeBSD kernel. But I am not sure if zlib library is
> linkable from the kernel.

Normally, no, you can't just link in a library designed for userland
into the kernel.  Some porting is required to deal with the kernel
environment -- things such as not having a full C library available,
different memory management, etc.

In this case however, there is already a zlib implementation in the
kernel.  IIRC, geom_uzip and the crypto framework both use it.

You may want to check out sys/net/zlib.[ch] and see if it can do what
you're after.  You'll need to make sure to include a dependency on the
zlib module and/or add it to your kernel configuration.

Good luck,
Craig
_______________________________________________
freebsd-hackers@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to