module compile error
Luigi Iannone
iannone at info.ucl.ac.be
Wed May 16 17:47:30 UTC 2007
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 at info.ucl.ac.be
More information about the freebsd-questions
mailing list