aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuri Victorovich <yuri@FreeBSD.org>2023-07-16 16:02:31 +0000
committerYuri Victorovich <yuri@FreeBSD.org>2023-07-16 16:02:31 +0000
commitd4bd77095e68b94d239daab1bd7873b4566c64a4 (patch)
tree751c725afd72059bcd4b7bc6b3bb90de10286efb
parent2b0841854ec7a92308287bb6904680150e3bb895 (diff)
downloadports-d4bd77095e68b94d239daab1bd7873b4566c64a4.tar.gz
ports-d4bd77095e68b94d239daab1bd7873b4566c64a4.zip
comms/flrig: Fix build on 14 with clang-16
A non-existent C++ feature std::ostringstream::streampos was used. Reported by: fallout
-rw-r--r--comms/flrig/files/patch-src_main.cxx23
1 files changed, 23 insertions, 0 deletions
diff --git a/comms/flrig/files/patch-src_main.cxx b/comms/flrig/files/patch-src_main.cxx
new file mode 100644
index 000000000000..ec83afcbd14c
--- /dev/null
+++ b/comms/flrig/files/patch-src_main.cxx
@@ -0,0 +1,23 @@
+- fix build on 14 with clang-16 because std::ostringstream::streampos
+- doesn't exist there.
+- using the C++ standard std::streampos instead.
+
+--- src/main.cxx.orig 2023-07-16 15:55:45 UTC
++++ src/main.cxx
+@@ -21,6 +21,7 @@
+ #include "config.h"
+
+ #include <stdlib.h>
++#include <ios>
+ #include <iostream>
+ #include <fstream>
+ #include <sstream>
+@@ -313,7 +314,7 @@ void rotate_log(std::string filename)
+ {
+ const int n = 5; // rename existing log files to keep up to 5 old versions
+ ostringstream oldfn, newfn;
+- ostringstream::streampos p;
++ streampos p;
+
+ oldfn << filename << '.';
+ newfn << filename << '.';