summaryrefslogtreecommitdiff
path: root/multimedia/naludump/files/patch-libsi-si.c
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/naludump/files/patch-libsi-si.c')
-rw-r--r--multimedia/naludump/files/patch-libsi-si.c24
1 files changed, 24 insertions, 0 deletions
diff --git a/multimedia/naludump/files/patch-libsi-si.c b/multimedia/naludump/files/patch-libsi-si.c
new file mode 100644
index 000000000000..770e8c704a82
--- /dev/null
+++ b/multimedia/naludump/files/patch-libsi-si.c
@@ -0,0 +1,24 @@
+--- a/libsi/si.c
++++ b/libsi/si.c
+@@ -13,7 +13,9 @@
+ #include "si.h"
+ #include <errno.h>
+ #include <iconv.h>
++#ifndef __FreeBSD__
+ #include <malloc.h>
++#endif
+ #include <stdlib.h> // for broadcaster stupidity workaround
+ #include <string.h>
+ #include "descriptor.h"
+@@ -381,7 +383,11 @@ bool convertCharacterTable(const char *f
+ if (SystemCharacterTable) {
+ iconv_t cd = iconv_open(SystemCharacterTable, fromCode);
+ if (cd != (iconv_t)-1) {
++#ifdef __FreeBSD__
++ const char *fromPtr = from;
++#else
+ char *fromPtr = (char *)from;
++#endif
+ while (fromLength > 0 && toLength > 1) {
+ if (iconv(cd, &fromPtr, &fromLength, &to, &toLength) == size_t(-1)) {
+ if (errno == EILSEQ) {