Include <unistd.h> for lseek()

This unbreaks my build in OpenBSD.  The old `long lseek()` conflicts
with `off_t lseek()` in OpenBSD headers, because long and off_t are
different types.  Commit b4df26e caused "system.h" to include some
headers where OpenBSD declares lseek().

Manuals for lseek() say to #include <unistd.h>.  Do so to be portable
to systems where other headers don't declare lseek().
This commit is contained in:
George Koehler 2019-03-22 13:18:07 -04:00
parent 3f61c0d507
commit f8cbe04447
2 changed files with 2 additions and 3 deletions

View file

@ -4,6 +4,7 @@
*/ */
/* $Id$ */ /* $Id$ */
#include <unistd.h>
#include "system.h" #include "system.h"
extern File *_get_entry(); extern File *_get_entry();
@ -16,7 +17,6 @@ sys_open(path, flag, filep)
{ {
register int fd; register int fd;
register File *fp; register File *fp;
long lseek();
if ((fp = _get_entry()) == (File *)0) if ((fp = _get_entry()) == (File *)0)
return 0; return 0;

View file

@ -4,10 +4,9 @@
*/ */
/* $Id$ */ /* $Id$ */
#include <unistd.h>
#include "system.h" #include "system.h"
long lseek();
int int
sys_seek(fp, off, whence, poff) sys_seek(fp, off, whence, poff)
File *fp; File *fp;