The sys/file.h include is likely not the correct include for any userland code. Most cases it's unneeded; in other cases fcntl.h is the correct header.
Index: bin/ed/buf.c =================================================================== RCS file: /cvs/src/bin/ed/buf.c,v retrieving revision 1.19 diff -u -p -r1.19 buf.c --- bin/ed/buf.c 27 Oct 2009 23:59:21 -0000 1.19 +++ bin/ed/buf.c 19 Nov 2014 20:57:00 -0000 @@ -29,7 +29,6 @@ * SUCH DAMAGE. */ -#include <sys/file.h> #include <sys/stat.h> #include "ed.h" Index: bin/ksh/history.c =================================================================== RCS file: /cvs/src/bin/ksh/history.c,v retrieving revision 1.39 diff -u -p -r1.39 history.c --- bin/ksh/history.c 19 May 2010 17:36:08 -0000 1.39 +++ bin/ksh/history.c 19 Nov 2014 20:57:04 -0000 @@ -19,7 +19,6 @@ #include <sys/stat.h> #ifdef HISTORY -# include <sys/file.h> # include <sys/mman.h> /* Index: sbin/fsck_ext2fs/setup.c =================================================================== RCS file: /cvs/src/sbin/fsck_ext2fs/setup.c,v retrieving revision 1.23 diff -u -p -r1.23 setup.c --- sbin/fsck_ext2fs/setup.c 13 Jul 2014 16:08:53 -0000 1.23 +++ sbin/fsck_ext2fs/setup.c 19 Nov 2014 20:56:05 -0000 @@ -40,7 +40,6 @@ #include <sys/ioctl.h> #include <sys/dkio.h> #include <sys/disklabel.h> -#include <sys/file.h> #include <errno.h> #include <fcntl.h> Index: sbin/mountd/mountd.c =================================================================== RCS file: /cvs/src/sbin/mountd/mountd.c,v retrieving revision 1.77 diff -u -p -r1.77 mountd.c --- sbin/mountd/mountd.c 22 Oct 2014 13:31:04 -0000 1.77 +++ sbin/mountd/mountd.c 19 Nov 2014 20:56:07 -0000 @@ -34,7 +34,6 @@ */ #include <sys/param.h> -#include <sys/file.h> #include <sys/ioctl.h> #include <sys/mount.h> #include <sys/socket.h> Index: sbin/newfs_ext2fs/newfs_ext2fs.c =================================================================== RCS file: /cvs/src/sbin/newfs_ext2fs/newfs_ext2fs.c,v retrieving revision 1.13 diff -u -p -r1.13 newfs_ext2fs.c --- sbin/newfs_ext2fs/newfs_ext2fs.c 29 Jun 2014 00:32:50 -0000 1.13 +++ sbin/newfs_ext2fs/newfs_ext2fs.c 19 Nov 2014 20:57:42 -0000 @@ -37,7 +37,6 @@ #include <sys/ioctl.h> #include <sys/dkio.h> #include <sys/disklabel.h> -#include <sys/file.h> #include <sys/mount.h> #include <ufs/ext2fs/ext2fs.h> @@ -46,6 +45,7 @@ #include <ctype.h> #include <err.h> #include <errno.h> +#include <fcntl.h> #include <inttypes.h> #include <limits.h> #include <paths.h> Index: sbin/pflogd/pflogd.c =================================================================== RCS file: /cvs/src/sbin/pflogd/pflogd.c,v retrieving revision 1.49 diff -u -p -r1.49 pflogd.c --- sbin/pflogd/pflogd.c 6 Nov 2012 02:50:47 -0000 1.49 +++ sbin/pflogd/pflogd.c 19 Nov 2014 20:56:10 -0000 @@ -32,7 +32,6 @@ #include <sys/types.h> #include <sys/ioctl.h> -#include <sys/file.h> #include <sys/stat.h> #include <sys/socket.h> #include <net/if.h> Index: sbin/ping/ping.c =================================================================== RCS file: /cvs/src/sbin/ping/ping.c,v retrieving revision 1.112 diff -u -p -r1.112 ping.c --- sbin/ping/ping.c 25 Oct 2014 03:18:13 -0000 1.112 +++ sbin/ping/ping.c 19 Nov 2014 20:55:07 -0000 @@ -54,7 +54,6 @@ #include <sys/types.h> #include <sys/queue.h> #include <sys/socket.h> -#include <sys/file.h> #include <sys/time.h> #include <netinet/in.h> Index: sbin/scsi/scsi.c =================================================================== RCS file: /cvs/src/sbin/scsi/scsi.c,v retrieving revision 1.28 diff -u -p -r1.28 scsi.c --- sbin/scsi/scsi.c 12 Nov 2013 04:59:02 -0000 1.28 +++ sbin/scsi/scsi.c 19 Nov 2014 20:58:14 -0000 @@ -46,13 +46,13 @@ #include <sys/types.h> #include <sys/wait.h> +#include <fcntl.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include <unistd.h> #include <errno.h> #include <sys/scsiio.h> -#include <sys/file.h> #include <ctype.h> #include <signal.h> #include <err.h>
