From owner-svn-src-all@freebsd.org Fri Dec 30 09:38:46 2016 Return-Path: Delivered-To: svn-src-all@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 EECE7C91B95; Fri, 30 Dec 2016 09:38:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BE05D1DF0; Fri, 30 Dec 2016 09:38:46 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id uBU9cjCQ007197; Fri, 30 Dec 2016 09:38:45 GMT (envelope-from dim@FreeBSD.org) Received: (from dim@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id uBU9cjJL007196; Fri, 30 Dec 2016 09:38:45 GMT (envelope-from dim@FreeBSD.org) Message-Id: <201612300938.uBU9cjJL007196@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: dim set sender to dim@FreeBSD.org using -f From: Dimitry Andric Date: Fri, 30 Dec 2016 09:38:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r310808 - stable/11/usr.bin/dtc X-SVN-Group: stable-11 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Dec 2016 09:38:47 -0000 Author: dim Date: Fri Dec 30 09:38:45 2016 New Revision: 310808 URL: https://svnweb.freebsd.org/changeset/base/310808 Log: MFC r309191 (by rakuco): fdt: Expect strchr() to return a const char* In C, strchr(3) returns a char*, whereas C++ defines two overloads: * const char *strchr(const char*, int) * char *strchr(char*, int) Building fdt.cc (with the WITHOUT_GPL_DTC knob set) with libc++ 3.9.0 (imported in r309124) was failing because libc++ r260377 added the first overload to string.h, leading to failures such as: fdt.cc:1638:8: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' Just define val as a const char* to fix it. Upstreamed in https://github.com/davidchisnall/dtc/pull/14 Modified: stable/11/usr.bin/dtc/fdt.cc Directory Properties: stable/11/ (props changed) Modified: stable/11/usr.bin/dtc/fdt.cc ============================================================================== --- stable/11/usr.bin/dtc/fdt.cc Fri Dec 30 08:59:49 2016 (r310807) +++ stable/11/usr.bin/dtc/fdt.cc Fri Dec 30 09:38:45 2016 (r310808) @@ -1590,7 +1590,7 @@ device_tree::parse_dts(const char *fn, F bool device_tree::parse_define(const char *def) { - char *val = strchr(def, '='); + const char *val = strchr(def, '='); if (!val) { if (strlen(def) != 0)