From owner-freebsd-current@FreeBSD.ORG Sat Apr 28 03:08:11 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 85A6B1065840; Sat, 28 Apr 2012 03:08:11 +0000 (UTC) (envelope-from obrien@NUXI.org) Received: from dragon.nuxi.org (trang.nuxi.org [74.95.12.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3D2868FC14; Sat, 28 Apr 2012 03:08:11 +0000 (UTC) Received: from dragon.nuxi.org (obrien@localhost [127.0.0.1]) by dragon.nuxi.org (8.14.5/8.14.5) with ESMTP id q3S385M8055033; Fri, 27 Apr 2012 20:08:05 -0700 (PDT) (envelope-from obrien@dragon.nuxi.org) Received: (from obrien@localhost) by dragon.nuxi.org (8.14.5/8.14.5/Submit) id q3S385Qd055032; Fri, 27 Apr 2012 20:08:05 -0700 (PDT) (envelope-from obrien) Date: Fri, 27 Apr 2012 20:08:05 -0700 From: "David O'Brien" To: Jan Sieka Message-ID: <20120428030805.GD80419@dragon.NUXI.org> Mail-Followup-To: obrien@freebsd.org, Jan Sieka , Current FreeBSD , Garrett Cooper , Doug Barton , Dimitry Andric References: <4F915384.6070308@semihalf.com> <4F919C50.70809@FreeBSD.org> <9B9312D3-489E-4EF1-85CB-0353024F6B94@gmail.com> <4F9428ED.6060902@FreeBSD.org> <3862F1CA-C1C8-49E6-B768-114A0A212496@gmail.com> <4F944139.4070309@FreeBSD.org> <4F9A8B91.6060005@semihalf.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4F9A8B91.6060005@semihalf.com> X-Operating-System: FreeBSD 10.0-CURRENT X-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? Precedence: bulk User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Garrett Cooper , Current FreeBSD , Dimitry Andric , Doug Barton Subject: Re: [workaroud/fix for] buildworld fails on FreeBSD 7.x for HEAD from 19.04.2012 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Reply-To: obrien@freebsd.org List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 28 Apr 2012 03:08:11 -0000 On Fri, Apr 27, 2012 at 02:05:37PM +0200, Jan Sieka wrote: > --- a/lib/libmagic/Makefile > +++ b/lib/libmagic/Makefile > @@ -10,9 +10,16 @@ DPADD= ${LIBZ} > LDADD= -lz > MAN= libmagic.3 magic.5 > > +HOSTOSRELDATE!= echo ${VERSION} | cut -d " " -f 4 $ cd lib/libmagic $ make -V VERSION {empty} Where is VERSION set? > +.if ${HOSTOSRELDATE} < 800000 > +GETLINE_C= getline.c > +.else > +GETLINE_C= > +.endif > SRCS= apprentice.c apptype.c ascmagic.c cdf.c cdf_time.c compress.c \ > encoding.c fsmagic.c funcs.c \ > - is_tar.c magic.c print.c readcdf.c readelf.c softmagic.c > + is_tar.c magic.c print.c readcdf.c readelf.c softmagic.c ${GETLINE_C} Just .if ${HOSTOSRELDATE} < 800000 GETLINE_C= getline.c .endif is shorter. Also r189136 (which added getline(3)) bumped __FreeBSD_version from 800066 to 800067. So your patch is broken for some systems. Getting this right is one reason I'm loath to carry around this type of hack in -CURRENT. > --- a/lib/libmagic/config.h > +++ b/lib/libmagic/config.h > /* Define to 1 if you have the `getline' function. */ > -#define HAVE_GETLINE 1 > +#if (__FreeBSD_version >= 800000) Where is "__FreeBSD_version" getting set? > +#else > +#define HAVE_GETLINE 0 > +#endif You've basically defined HAVE_GETLINE always as "0". -- -- David (obrien@FreeBSD.org)