If compiling for NetBSD/vax, define boolean_t here before including

<sys/file.h> with _KERNEL defined.  Also add a 3-line XXX comment
explaining some of why this is done.
Should fix the build problem documented in PR#32907.
Will be documented in doc/HACKS shortly.
Fix discussed with thorpej.
This commit is contained in:
he 2006-03-07 18:18:06 +00:00
parent 4e6df87951
commit 56dbe819ca
2 changed files with 18 additions and 2 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: iptests.c,v 1.7 2004/07/23 05:39:03 martti Exp $ */
/* $NetBSD: iptests.c,v 1.8 2006/03/07 18:18:06 he Exp $ */
/*
* Copyright (C) 1993-1998 by Darren Reed.
@ -12,6 +12,14 @@ static const char rcsid[] = "@(#)Id: iptests.c,v 2.8.2.3 2004/04/16 23:33:04 dar
#endif
#include <sys/param.h>
#include <sys/types.h>
#if defined(__NetBSD__) && defined(__vax__)
/*
* XXX need to declare boolean_t for _KERNEL <sys/files.h>
* which ends up including <sys/device.h> for vax. See PR#32907
* for further details.
*/
typedef int boolean_t;
#endif
#include <sys/time.h>
#if !defined(__osf__)
# define _KERNEL

View File

@ -1,4 +1,4 @@
/* $NetBSD: sock.c,v 1.6 2004/03/28 09:00:56 martti Exp $ */
/* $NetBSD: sock.c,v 1.7 2006/03/07 18:18:06 he Exp $ */
/*
* sock.c (C) 1995-1998 Darren Reed
@ -14,6 +14,14 @@ static const char rcsid[] = "@(#)Id: sock.c,v 2.8.4.1 2004/03/23 12:58:06 darren
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
#if defined(__NetBSD__) && defined(__vax__)
/*
* XXX need to declare boolean_t for _KERNEL <sys/files.h>
* which ends up including <sys/device.h> for vax. See PR#32907
* for further details.
*/
typedef int boolean_t;
#endif
#ifndef ultrix
#include <fcntl.h>
#endif