From owner-freebsd-hackers Tue Aug 15 15:43:47 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from wireless.net (wireless.net [207.137.156.159]) by hub.freebsd.org (Postfix) with ESMTP id EDECC37B9E2 for ; Tue, 15 Aug 2000 15:43:41 -0700 (PDT) (envelope-from dbutter@wireless.net) Received: from db.wireless.net (db.wireless.net [209.75.70.101]) by wireless.net (8.9.3/8.9.3) with ESMTP id PAA12996; Tue, 15 Aug 2000 15:43:47 -0700 (PDT) Received: from wireless.net (dbm.wireless.net [192.168.0.2]) by db.wireless.net (8.9.3/8.9.3) with ESMTP id PAA63534; Tue, 15 Aug 2000 15:36:35 -0700 (PDT) (envelope-from dbutter@wireless.net) Message-ID: <3999C799.79ED6343@wireless.net> Date: Tue, 15 Aug 2000 15:43:37 -0700 From: Devin Butterfield X-Mailer: Mozilla 4.73 [en] (X11; I; Linux 2.2.12 i386) X-Accept-Language: en MIME-Version: 1.0 To: Warner Losh Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: /usr/include/sys/opt_posix.h missing...? References: <3998F562.C5B0B82A@wireless.net> <200008151852.MAA99835@harmony.village.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Warner Losh wrote: > > In message <3998F562.C5B0B82A@wireless.net> Devin Butterfield writes: > : In trying to compile driver code which includes unistd.h, the compiler > : complains: > > #include > > 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 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 > > 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. You're right. I normally always do this as a module but was experimenting with some other code not using an appropriate Makefile. I still wonder why unistd.h (assuming it is not supported for drivers) would make any reference to a file that does not exist where it was looking? Nevertheless, thanks again for your help. All is fine now...:-) -- Regards, Devin. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message