svn commit: r457814 - in head/sysutils/smartmontools: . files
Dimitry Andric
dim at FreeBSD.org
Mon Jan 1 23:22:38 UTC 2018
On 2 Jan 2018, at 00:17, Eugene Grosbein <eugen at grosbein.net> wrote:
>
> 02.01.2018 4:19, Dimitry Andric пишет:
>> Author: dim (src committer)
>> Date: Mon Jan 1 21:19:33 2018
>> New Revision: 457814
>> URL: https://svnweb.freebsd.org/changeset/ports/457814
>>
>> Log:
>> Make smartmontools 6.6 compile with clang 6.0.0 and higher
>>
>> Because clang 6.0.0 and higher default to -std=gnu++14, like gcc 6 and
>> higher, compiling smartmontools results in the following error:
>>
>> os_freebsd.cpp:487:45: error: invalid suffix on literal; C++11 requires
>> a space between literal and identifier [-Wreserved-user-defined-literal]
>> else if (sscanf(dev, NVME_CTRLR_PREFIX"%d"NVME_NS_PREFIX"%d%c",
>> ^
>>
>> Fix this by adding spaces around the NVME_NS_PREFIX macro. This makes
>> the source C++14 compatible.
>>
>> Approved by: samm at os2.kiev.ua (maintainer)
>> PR: 224826
>> MFH: 2018Q1
>
> Why don't you just modify CFLAGS to set -std=... to right mode
> corresponding to current coding style of smartmontools instead?
Yes, that was also a possibility, which I mentioned in the PR (though
one should put USE_CXXSTD= in the port Makefile instead). I think this
is more future-proof though.
Some C++ programs are hard to adapt to C++11 or higher, but not this
one.
-Dimitry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 223 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.freebsd.org/pipermail/svn-ports-head/attachments/20180102/13d71859/attachment.sig>
More information about the svn-ports-head
mailing list