aboutsummaryrefslogtreecommitdiffstats
path: root/converters
diff options
context:
space:
mode:
authormarcus <marcus@FreeBSD.org>2012-03-05 07:56:55 +0800
committermarcus <marcus@FreeBSD.org>2012-03-05 07:56:55 +0800
commitc53f1ba162d1753bc164ddf825b70508ab71b7ad (patch)
tree5394d924fb5947fb48968eba9656f6af33f2e389 /converters
parent6256f3843371078e431c278e061c0598ff7ad562 (diff)
downloadfreebsd-ports-gnome-c53f1ba162d1753bc164ddf825b70508ab71b7ad.tar.gz
freebsd-ports-gnome-c53f1ba162d1753bc164ddf825b70508ab71b7ad.tar.zst
freebsd-ports-gnome-c53f1ba162d1753bc164ddf825b70508ab71b7ad.zip
Fix building C++ code that uses libiconv.
PR: 165348 Submitted by: Pedro Giffuni <giffunip@tutopia.com>
Diffstat (limited to 'converters')
-rw-r--r--converters/libiconv/files/patch-include_iconv.h.in43
1 files changed, 43 insertions, 0 deletions
diff --git a/converters/libiconv/files/patch-include_iconv.h.in b/converters/libiconv/files/patch-include_iconv.h.in
new file mode 100644
index 000000000000..917b61604b0c
--- /dev/null
+++ b/converters/libiconv/files/patch-include_iconv.h.in
@@ -0,0 +1,43 @@
+diff --git include/iconv.h.in include/iconv.h.in
+--- include/iconv.h.in
++++ include/iconv.h.in
+@@ -89,6 +89,11 @@ extern size_t iconv (iconv_t cd, @ICONV_CONST@ char* * inbuf, size_t *inbyteslef
+ extern int iconv_close (iconv_t cd);
+
+
++#ifdef __cplusplus
++}
++#endif
++
++
+ #ifndef LIBICONV_PLUG
+
+ /* Nonstandard extensions. */
+@@ -106,6 +111,10 @@ extern int iconv_close (iconv_t cd);
+ #include <wchar.h>
+ #endif
+
++#ifdef __cplusplus
++extern "C" {
++#endif
++
+ /* A type that holds all memory needed by a conversion descriptor.
+ A pointer to such an object can be used as an iconv_t. */
+ typedef struct {
+@@ -223,12 +232,11 @@ extern const char * iconv_canonicalize (const char * name);
+ extern void libiconv_set_relocation_prefix (const char *orig_prefix,
+ const char *curr_prefix);
+
+-#endif
+-
+-
+ #ifdef __cplusplus
+ }
+ #endif
+
++#endif
++
+
+ #endif /* _LIBICONV_H */
+--
+1.7.2.5