From owner-freebsd-ports Sun Mar 24 8:20:13 2002 Delivered-To: freebsd-ports@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id AEB6437B404 for ; Sun, 24 Mar 2002 08:20:03 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g2OGK3X69485; Sun, 24 Mar 2002 08:20:03 -0800 (PST) (envelope-from gnats) Date: Sun, 24 Mar 2002 08:20:03 -0800 (PST) Message-Id: <200203241620.g2OGK3X69485@freefall.freebsd.org> To: freebsd-ports@FreeBSD.org Cc: From: Miguel Mendez Subject: Re: ports/36254: Conflicting function definition with standard libraries Reply-To: Miguel Mendez Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR ports/36254; it has been noted by GNATS. From: Miguel Mendez To: Jerome Mainka Cc: freebsd-gnats-submit@FreeBSD.org Subject: Re: ports/36254: Conflicting function definition with standard libraries Date: Sun, 24 Mar 2002 17:16:25 +0100 --7JfCtLOvnd9MIVvH Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Mar 24, 2002 at 08:04:54AM -0800, Jerome Mainka wrote: >=20 > the function strnstr defined in libs/libwww/HTReader.c:80 is already defi= ned in /usr/include/string.h:93 Unfortunately, that will break compilation of the port on older systems, where that function it's not part of libc. My humble suggestion: Put a check like this in the port makefile: =2Eif ${OSVERSION} < 440003 || ${OSVERSION} >=3D 500000 && ${OSVERSION} < 500027 CFLAGS+=3D -DNEED_STRNSTR =2Eendif Then, patch the source code and surround that function with and #ifdef NEED_STRNSTR Cheers, --=20 Miguel Mendez - flynn@energyhq.homeip.net GPG Public Key :: http://energyhq.homeip.net/files/pubkey.txt EnergyHQ :: http://www.energyhq.tk FreeBSD - The power to serve! --7JfCtLOvnd9MIVvH Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD4DBQE8nfvZnLctrNyFFPERAiasAJidh+2L93Y+mpWRCx7G8SBSSdL3AJ9+qXi5 TaMuF3YelGLIIY/GVHT76g== =I71p -----END PGP SIGNATURE----- --7JfCtLOvnd9MIVvH-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message