[prev in list] [next in list] [prev in thread] [next in thread]
List: freebsd-commits-all
Subject: svn commit: r309191 - head/usr.bin/dtc
From: Raphael Kubo da Costa <rakuco () FreeBSD ! org>
Date: 2016-11-26 12:36:12
Message-ID: 201611261236.uAQCaCd7097610 () repo ! freebsd ! org
[Download RAW message or body]
Author: rakuco (ports committer)
Date: Sat Nov 26 12:36:11 2016
New Revision: 309191
URL: https://svnweb.freebsd.org/changeset/base/309191
Log:
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
Reviewed by: emaste
Approved by: emaste
Modified:
head/usr.bin/dtc/fdt.cc
Modified: head/usr.bin/dtc/fdt.cc
==============================================================================
--- head/usr.bin/dtc/fdt.cc Sat Nov 26 10:36:48 2016 (r309190)
+++ head/usr.bin/dtc/fdt.cc Sat Nov 26 12:36:11 2016 (r309191)
@@ -1635,7 +1635,7 @@ device_tree::parse_dts(const string &fn,
bool device_tree::parse_define(const char *def)
{
- char *val = strchr(def, '=');
+ const char *val = strchr(def, '=');
if (!val)
{
if (strlen(def) != 0)
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic