Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 2 Jan 2018 18:20:28 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r457915 - in branches/2018Q1/sysutils/smartmontools: . files
Message-ID:  <201801021820.w02IKS3R089409@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim (src committer)
Date: Tue Jan  2 18:20:28 2018
New Revision: 457915
URL: https://svnweb.freebsd.org/changeset/ports/457915

Log:
  MFH: r457814
  
  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:	portmgr (zi)
  Approved by:	samm@os2.kiev.ua (maintainer)
  PR:		224826

Added:
  branches/2018Q1/sysutils/smartmontools/files/patch-os__freebsd.cpp
     - copied unchanged from r457814, head/sysutils/smartmontools/files/patch-os__freebsd.cpp
Modified:
  branches/2018Q1/sysutils/smartmontools/Makefile
Directory Properties:
  branches/2018Q1/   (props changed)

Modified: branches/2018Q1/sysutils/smartmontools/Makefile
==============================================================================
--- branches/2018Q1/sysutils/smartmontools/Makefile	Tue Jan  2 16:49:24 2018	(r457914)
+++ branches/2018Q1/sysutils/smartmontools/Makefile	Tue Jan  2 18:20:28 2018	(r457915)
@@ -3,6 +3,7 @@
 
 PORTNAME=	smartmontools
 PORTVERSION=	6.6
+PORTREVISION=	1
 CATEGORIES=	sysutils
 MASTER_SITES=	SF
 

Copied: branches/2018Q1/sysutils/smartmontools/files/patch-os__freebsd.cpp (from r457814, head/sysutils/smartmontools/files/patch-os__freebsd.cpp)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ branches/2018Q1/sysutils/smartmontools/files/patch-os__freebsd.cpp	Tue Jan  2 18:20:28 2018	(r457915, copy of r457814, head/sysutils/smartmontools/files/patch-os__freebsd.cpp)
@@ -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?201801021820.w02IKS3R089409>