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:
		
							parent
							
								
									3f61c0d507
								
							
						
					
					
						commit
						f8cbe04447
					
				
					 2 changed files with 2 additions and 3 deletions
				
			
		| 
						 | 
				
			
			@ -4,6 +4,7 @@
 | 
			
		|||
 */
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#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;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,10 +4,9 @@
 | 
			
		|||
 */
 | 
			
		||||
/* $Id$ */
 | 
			
		||||
 | 
			
		||||
#include <unistd.h>
 | 
			
		||||
#include "system.h"
 | 
			
		||||
 | 
			
		||||
long lseek();
 | 
			
		||||
 | 
			
		||||
int
 | 
			
		||||
sys_seek(fp, off, whence, poff)
 | 
			
		||||
	File *fp;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue