From f8cbe044479c99861f60134270f70153dca3266c Mon Sep 17 00:00:00 2001 From: George Koehler Date: Fri, 22 Mar 2019 13:18:07 -0400 Subject: [PATCH] Include 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 . Do so to be portable to systems where other headers don't declare lseek(). --- modules/src/system/open.c | 2 +- modules/src/system/seek.c | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/modules/src/system/open.c b/modules/src/system/open.c index cf24f3206..1433cea9f 100644 --- a/modules/src/system/open.c +++ b/modules/src/system/open.c @@ -4,6 +4,7 @@ */ /* $Id$ */ +#include #include "system.h" extern File *_get_entry(); @@ -16,7 +17,6 @@ sys_open(path, flag, filep) { register int fd; register File *fp; - long lseek(); if ((fp = _get_entry()) == (File *)0) return 0; diff --git a/modules/src/system/seek.c b/modules/src/system/seek.c index e4d1f8580..97749ae12 100644 --- a/modules/src/system/seek.c +++ b/modules/src/system/seek.c @@ -4,10 +4,9 @@ */ /* $Id$ */ +#include #include "system.h" -long lseek(); - int sys_seek(fp, off, whence, poff) File *fp;