Subject: minor problem in -current build this morning
To: None <current-users@NetBSD.ORG>
From: Erik E. Fair <fair@cesium.clock.org>
List: current-users
Date: 03/28/1997 10:56:01
	===> sbin/ipf
	cc -O  -Werror  -c ipf.c
	ipf.c: In function `opendevice':
	ipf.c:144: `IPL_NAME' undeclared (first use this function)
	ipf.c:144: (Each undeclared identifier is reported only once
	ipf.c:144: for each function it appears in.)
	*** Error code 1

	Stop.
	*** Error code 1

	Stop.
	*** Error code 1

	Stop.
	78.8u 39.5s 2:27.38 80.3% 0+0k 1552+346io 1373pf+0w
	make (the world) failed, code 1


I think the following diff is what was meant (it certainly compiles):


*** ipf.c.orig	Wed Jan 29 04:15:43 1997
--- ipf.c	Fri Mar 28 10:48:37 1997
***************
*** 36,41 ****
--- 36,42 ----
  #include <arpa/nameser.h>
  #include <resolv.h>
  #include "ipf.h"
+ #include "pathnames.h"
  
  #if !defined(lint) && defined(LIBC_SCCS)
  static	char	sccsid[] = "@(#)ipf.c	1.23 6/5/96 (C) 1993-1995 Darren Reed";
***************
*** 137,148 ****
  
  static int opendevice()
  {
  	if (opts & OPT_DONOTHING)
  		return -2;
  
  	if (!(opts & OPT_DONOTHING) && fd == -1)
! 		if ((fd = open(IPL_NAME, O_RDWR)) == -1)
! 			if ((fd = open(IPL_NAME, O_RDONLY)) == -1)
  				perror("open device");
  	return fd;
  }
--- 138,151 ----
  
  static int opendevice()
  {
+ 	static char	*device = _PATH_IPL;
+ 
  	if (opts & OPT_DONOTHING)
  		return -2;
  
  	if (!(opts & OPT_DONOTHING) && fd == -1)
! 		if ((fd = open(device, O_RDWR)) == -1)
! 			if ((fd = open(device, O_RDONLY)) == -1)
  				perror("open device");
  	return fd;
  }