From owner-freebsd-ports@FreeBSD.ORG Mon Mar 29 19:53:52 2010 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33234106566B for ; Mon, 29 Mar 2010 19:53:52 +0000 (UTC) (envelope-from mailnull@mips.inka.de) Received: from mail-in-06.arcor-online.net (mail-in-06.arcor-online.net [151.189.21.46]) by mx1.freebsd.org (Postfix) with ESMTP id DDA1B8FC13 for ; Mon, 29 Mar 2010 19:53:51 +0000 (UTC) Received: from mail-in-02-z2.arcor-online.net (mail-in-02-z2.arcor-online.net [151.189.8.14]) by mx.arcor.de (Postfix) with ESMTP id ABBE439A6D7 for ; Mon, 29 Mar 2010 21:53:50 +0200 (CEST) Received: from mail-in-09.arcor-online.net (mail-in-09.arcor-online.net [151.189.21.49]) by mail-in-02-z2.arcor-online.net (Postfix) with ESMTP id A421E1140FE for ; Mon, 29 Mar 2010 21:53:50 +0200 (CEST) Received: from lorvorc.mips.inka.de (dslb-092-075-194-175.pools.arcor-ip.net [92.75.194.175]) by mail-in-09.arcor-online.net (Postfix) with ESMTPS id 6CD301AF5A2 for ; Mon, 29 Mar 2010 21:53:50 +0200 (CEST) X-DKIM: Sendmail DKIM Filter v2.8.2 mail-in-09.arcor-online.net 6CD301AF5A2 Received: from lorvorc.mips.inka.de (localhost [127.0.0.1]) by lorvorc.mips.inka.de (8.14.4/8.14.3) with ESMTP id o2TJrnj6006700 for ; Mon, 29 Mar 2010 21:53:49 +0200 (CEST) (envelope-from mailnull@lorvorc.mips.inka.de) Received: (from mailnull@localhost) by lorvorc.mips.inka.de (8.14.4/8.14.4/Submit) id o2TJrnvS006699 for freebsd-ports@freebsd.org; Mon, 29 Mar 2010 21:53:49 +0200 (CEST) (envelope-from mailnull) From: naddy@mips.inka.de (Christian Weisgerber) Date: Mon, 29 Mar 2010 19:53:49 +0000 (UTC) Message-ID: Originator: naddy@mips.inka.de (Christian Weisgerber) To: freebsd-ports@freebsd.org Subject: Be careful with fdopendir() on RELENG_7 X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 29 Mar 2010 19:53:52 -0000 There is a silly bug in RELENG_7 up to and including RELENG_7_3: fdopendir(3) is available in libc, but the prototype is missing from . This can have unexpected consequences. A configure script can notice that fdopendir() is available, but due to the missing prototype, the function will be typed as the default int fdopendir(); This is bad. fdopendir() returns a pointer and unless correctly prototyped, the return value will be truncated from 64 to 32 bits on LP64 platforms. So if you notice that something picks up the fdopendir() function you need to either disable it for 702102 to 703100 (inclusive) or make sure that the correct prototype DIR *fdopendir(int); is wedged in somehow. This isn't a hypothetical concern. When I initially tried gtar 1.23 on 7.3/amd64, it left a trail of coredumps because of this. -- Christian "naddy" Weisgerber naddy@mips.inka.de