Date: Wed, 16 May 2007 19:28:34 +0200 From: Luigi Iannone <iannone@info.ucl.ac.be> To: freebsd-questions@freebsd.org Subject: module compile error Message-ID: <D07097C3-DE24-4F8F-B43C-1C3D1EF75806@info.ucl.ac.be>
next in thread | raw e-mail | index | archive | help
Hi all,
I'm trying to implement a freebsd module, but I'm blocked on the
following error:
When I try to compile my module, which has the following event handler
static int
module_event(module_t mod, int type, void *data)
{
int err = 0;
int s;
switch (type) {
case MOD_LOAD:
s = socket(AF_INET, SOCK_DGRAM, 0); /* THIS IS THE
ERROR...*/
#ifdef LISP_DEBUG
log(LOG_DEBUG," Module loaded ");
#endif /* LISP_DEBUG */
break;
case MOD_UNLOAD:
#ifdef LISP_DEBUG
log(LOG_DEBUG," Module unloaded");
#endif /* LISP_DEBUG */
break;
default:
err = EINVAL;
break;
}
return err;
}
The compiler blocks with the error "warning: implicit declaration of
function 'socket' ..... "warning: nested extern declaration of
'socket'".
Any hint on what I do wrong?
If this is not the correct mailinglist I apologies, just let me know
where to send my question.
Thanks
iannone@info.ucl.ac.be
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?D07097C3-DE24-4F8F-B43C-1C3D1EF75806>
