aboutsummaryrefslogtreecommitdiffstats
path: root/sysutils
diff options
context:
space:
mode:
authordim <dim@FreeBSD.org>2018-01-02 05:19:33 +0800
committerdim <dim@FreeBSD.org>2018-01-02 05:19:33 +0800
commit8e4c36acef9b1a47be70c0cb8a309adf005e991c (patch)
treeb373168c4dbbedc0b92e90036e484d5a640a6f1d /sysutils
parent0a42d634f5fd9ed0db592291c36d74788aac1164 (diff)
downloadfreebsd-ports-gnome-8e4c36acef9b1a47be70c0cb8a309adf005e991c.tar.gz
freebsd-ports-gnome-8e4c36acef9b1a47be70c0cb8a309adf005e991c.tar.zst
freebsd-ports-gnome-8e4c36acef9b1a47be70c0cb8a309adf005e991c.zip
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
Diffstat (limited to 'sysutils')
-rw-r--r--sysutils/smartmontools/Makefile1
-rw-r--r--sysutils/smartmontools/files/patch-os__freebsd.cpp11
2 files changed, 12 insertions, 0 deletions
diff --git a/sysutils/smartmontools/Makefile b/sysutils/smartmontools/Makefile
index de583d565e50..8d1e8ded4514 100644
--- a/sysutils/smartmontools/Makefile
+++ b/sysutils/smartmontools/Makefile
@@ -3,6 +3,7 @@
PORTNAME= smartmontools
PORTVERSION= 6.6
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= SF
diff --git a/sysutils/smartmontools/files/patch-os__freebsd.cpp b/sysutils/smartmontools/files/patch-os__freebsd.cpp
new file mode 100644
index 000000000000..640b0f3ba2b1
--- /dev/null
+++ b/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) {