From owner-freebsd-arm@freebsd.org Tue Sep 26 04:59:09 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 337D3E2EF54 for ; Tue, 26 Sep 2017 04:59:09 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from ipmail03.adl2.internode.on.net (ipmail03.adl2.internode.on.net [150.101.137.141]) by mx1.freebsd.org (Postfix) with ESMTP id 0DA0F76430 for ; Tue, 26 Sep 2017 04:59:07 +0000 (UTC) (envelope-from darius@dons.net.au) Received: from unknown (HELO midget.dons.net.au) ([118.211.110.227]) by ipmail03.adl2.internode.on.net with ESMTP; 26 Sep 2017 14:23:55 +0930 Received: from midget.dons.net.au (localhost [127.0.0.1]) by midget.dons.net.au (8.15.1/8.14.9) with ESMTPS id v8Q4rYoK087529 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 26 Sep 2017 14:23:51 +0930 (CST) (envelope-from darius@dons.net.au) Received: (from mailnull@localhost) by midget.dons.net.au (8.15.1/8.14.9/Submit) id v8Q4h2Ne080872 for ; Tue, 26 Sep 2017 14:13:02 +0930 (CST) (envelope-from darius@dons.net.au) X-Authentication-Warning: midget.dons.net.au: mailnull set sender to using -f Received: from [10.176.138.114] (ns.dons.net.au [10.0.2.1]) by ns.dons.net.au (envelope-sender ) (MIMEDefang) with ESMTP id v8Q4guHh080868; Tue, 26 Sep 2017 14:13:02 +0930 Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: Why does this compile? From: "O'Connor, Daniel" In-Reply-To: Date: Tue, 26 Sep 2017 14:12:56 +0930 Cc: freebsd-arm Content-Transfer-Encoding: 7bit Message-Id: <43AA1F17-397E-489F-967B-FB69C7E3BF5D@dons.net.au> References: To: Russell Haley X-Mailer: Apple Mail (2.3273) X-Spam-Score: -1 () No, score=-1.0 required=5.0 tests=ALL_TRUSTED, RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.0 X-Scanned-By: MIMEDefang 2.75 on 10.0.2.1 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Sep 2017 04:59:09 -0000 > On 26 Sep 2017, at 14:08, Russell Haley wrote: > This compiles on FreeBSD current and apparently on 11 too. That's a > bad thing because it's supposed to fail. I checked in.h and there is > no struct for in_pktinfo. Not surprisingly, if I remove the include > altogether, it still compiles. > > I assume then that the original author made a mistake? My C is too > weak and most of my searches don't turn up anything close to what I'm > looking for. > > Any suggestions would be awesome. :) Change the test to.. check_c_source_compiles( " #include <${SOCKET_INCLUDES}> int main() { struct in_pktinfo teststruct; return 0; } " HAVE_IN_PKTINFO) i.e. the original test is broken and will always compile (as you discovered). -- Daniel O'Connor "The nice thing about standards is that there are so many of them to choose from." -- Andrew Tanenbaum GPG Fingerprint - 5596 B766 97C0 0E94 4347 295E E593 DC20 7B3F CE8C