Date: Mon, 1 Jan 2018 21:19:33 +0000 (UTC) From: Dimitry Andric <dim@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r457814 - in head/sysutils/smartmontools: . files Message-ID: <201801012119.w01LJXE9054540@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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@os2.kiev.ua (maintainer) PR: 224826 MFH: 2018Q1 Added: head/sysutils/smartmontools/files/patch-os__freebsd.cpp (contents, props changed) Modified: head/sysutils/smartmontools/Makefile Modified: head/sysutils/smartmontools/Makefile ============================================================================== --- head/sysutils/smartmontools/Makefile Mon Jan 1 20:59:45 2018 (r457813) +++ head/sysutils/smartmontools/Makefile Mon Jan 1 21:19:33 2018 (r457814) @@ -3,6 +3,7 @@ PORTNAME= smartmontools PORTVERSION= 6.6 +PORTREVISION= 1 CATEGORIES= sysutils MASTER_SITES= SF Added: head/sysutils/smartmontools/files/patch-os__freebsd.cpp ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/sysutils/smartmontools/files/patch-os__freebsd.cpp Mon Jan 1 21:19:33 2018 (r457814) @@ -0,0 +1,11 @@ +--- os_freebsd.cpp.orig 2017-04-24 16:34:16 UTC ++++ os_freebsd.cpp +@@ -484,7 +484,7 @@ bool freebsd_nvme_device::open() + } + nsid = 0xFFFFFFFF; // broadcast id + } +- else if (sscanf(dev, NVME_CTRLR_PREFIX"%d"NVME_NS_PREFIX"%d%c", ++ else if (sscanf(dev, NVME_CTRLR_PREFIX"%d" NVME_NS_PREFIX "%d%c", + &ctrlid, &nsid, &tmp) == 2) + { + if(ctrlid < 0 || nsid < 0) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201801012119.w01LJXE9054540>