Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Aug 2000 12:52:07 -0600
From:      Warner Losh <imp@village.org>
To:        Devin Butterfield <dbutter@wireless.net>
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: /usr/include/sys/opt_posix.h missing...? 
Message-ID:  <200008151852.MAA99835@harmony.village.org>
In-Reply-To: Your message of "Tue, 15 Aug 2000 00:46:42 PDT." <3998F562.C5B0B82A@wireless.net> 
References:  <3998F562.C5B0B82A@wireless.net>  

next in thread | previous in thread | raw e-mail | index | archive | help
In message <3998F562.C5B0B82A@wireless.net> Devin Butterfield writes:
: In trying to compile driver code which includes unistd.h, the compiler
: complains:

#include <unistd.h>

isn't supported for drivers.  You should not be including the
-I/usr/include on the command line to compile the driver.  If you are
building a module, you should be using the bsd.kmod.mk framework to
build the modules.  include <sys/unistd.h> instead.

You will also need to create an opt_posix.h in your driver's Makefile:

KMOD=ifx
SRCS=ifx.c device_if.h bus_if.h opt_posix.h

.include <bsd.kmod.mk>

should be all you need.  You may also need to define SYSDIR as well if
you don't have it installed in /usr/src/sys.

Warner


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200008151852.MAA99835>