textproc/sablotron: Modify iconv patch to support DragonFly

DragonFly 3.4 and DragonFly 3.6 have different iconv prototypes.
This modifies the FreeBSD support patch to handle the two different
DragonFly cases as well.
This commit is contained in:
John Marino 2013-10-07 09:24:12 +00:00
parent 51bfa6a800
commit d95f23e85f
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=329668

View file

@ -1,11 +1,23 @@
--- ./src/engine/encoding.cpp.orig 2013-07-30 16:44:46.000000000 +0200
+++ ./src/engine/encoding.cpp 2013-07-30 16:46:02.000000000 +0200
@@ -278,7 +278,7 @@
--- src/engine/encoding.cpp.orig 2003-11-21 08:45:11.000000000 +0000
+++ src/engine/encoding.cpp
@@ -30,6 +30,7 @@
* GPL.
*/
#include <errno.h>
+#include <sys/param.h>
#include "encoding.h"
#include "proc.h"
@@ -278,7 +279,12 @@ eFlag Recoder::conv(Sit S, CDesc cd, con
errno = 0;
iconv((iconv_t)(cd -> physCD),
# ifdef SABLOT_ICONV_CAST_OK
- (char**)(&inbuf),
+#if defined(__FreeBSD__) || \
+ (defined(__DragonFly__) && __DragonFly_version > 300502)
+ (const char**)(&inbuf),
+#else
(char**)(&inbuf),
+#endif
# else
&inbuf,
# endif