freebsd-ports/graphics/ipe/files/patch-ipelib__ipedoc.cpp
John Marino 237fc7e2cf graphics/ipe: Update patch to support DragonFly
DragonFly 3.4 uses char* prototype for iconv while the upcoming
DragonFly 3.6 uses const char* iconv prototype like FreeBSD does.
Modify the iconv patch to allow graphics/ipe to build on both
DragonFly releases.
2013-10-07 09:04:10 +00:00

23 lines
584 B
C++

--- ipelib/ipedoc.cpp.orig 2013-03-15 13:37:02.000000000 +0000
+++ ipelib/ipedoc.cpp
@@ -41,6 +41,7 @@
#include "ipelatex.h"
#include <errno.h>
+#include <sys/param.h>
#ifdef IPE_USE_ICONV
#include <iconv.h>
@@ -850,7 +851,12 @@ int Document::runLatex(String &texLog)
if (!file)
return ErrWritingSource;
+#if defined(__FreeBSD__) || \
+ (defined(__DragonFly__) && __DragonFly_version > 300502)
+ const char *inbuf = utf8.data();
+#else
char *inbuf = (char *) utf8.data();
+#endif
size_t inbytesleft = utf8.size();
FileStream fstream(file);