From 9dea405fb989e40e14fd936a3ad6b039033328a0 Mon Sep 17 00:00:00 2001 From: jbeich Date: Fri, 18 Nov 2016 03:34:24 +0000 Subject: graphics/zphoto: unbreak with libc++ 3.9 image.cpp:557:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *suffix1 = strrchr(src, '.'); ^ ~~~~~~~~~~~~~~~~~~ image.cpp:558:11: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *' char *suffix2 = strrchr(dest, '.'); ^ ~~~~~~~~~~~~~~~~~~ PR: 212343 Reported by: antoine (via exp-run) --- graphics/zphoto/files/patch-image.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 graphics/zphoto/files/patch-image.cpp (limited to 'graphics') diff --git a/graphics/zphoto/files/patch-image.cpp b/graphics/zphoto/files/patch-image.cpp new file mode 100644 index 000000000000..68e00e71744d --- /dev/null +++ b/graphics/zphoto/files/patch-image.cpp @@ -0,0 +1,13 @@ +--- image.cpp.orig 2004-07-20 16:48:11 UTC ++++ image.cpp +@@ -554,8 +554,8 @@ restore_mtime (const char *file_name, ti + static int + convert_needed_p (const char *src, const char *dest) + { +- char *suffix1 = strrchr(src, '.'); +- char *suffix2 = strrchr(dest, '.'); ++ const char *suffix1 = strrchr(src, '.'); ++ const char *suffix2 = strrchr(dest, '.'); + + return strcmp(suffix1, suffix2) != 0; + } -- cgit