aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2017-02-01 20:30:08 +0800
committerjbeich <jbeich@FreeBSD.org>2017-02-01 20:30:08 +0800
commitd222516fd9b82aa687202d34b8cc30b11700dada (patch)
tree86193bcbd1a1509971287654ce71e2e71cbb65d5
parent5f2c9966321adf26561fc1f87732dfb97e7f5d2b (diff)
downloadfreebsd-ports-gnome-d222516fd9b82aa687202d34b8cc30b11700dada.tar.gz
freebsd-ports-gnome-d222516fd9b82aa687202d34b8cc30b11700dada.tar.zst
freebsd-ports-gnome-d222516fd9b82aa687202d34b8cc30b11700dada.zip
net-im/jabber: unbreak with libc++ 3.9
log.cc:89:8: error: assigning to 'char *' from incompatible type 'const char *' pos = strchr(zone,'.'); ^~~~~~~~~~~~~~~~ xmlnode.cc:913:21: error: assigning to 'char *' from incompatible type 'const char *' start_predicate = strchr(path, '['); ^ ~~~~~~~~~~~~~~~~~ xmlnode.cc:914:15: error: assigning to 'char *' from incompatible type 'const char *' next_step = strchr(path, '/'); ^ ~~~~~~~~~~~~~~~~~ xmlnode.cc:1836:27: error: read-only variable is not assignable strchr(lang, '-')[0] = 0; ~~~~~~~~~~~~~~~~~~~~ ^ Reported by: pkg-fallout
-rw-r--r--net-im/jabber/Makefile2
-rw-r--r--net-im/jabber/files/patch-jabberd_lib_xmlnode.cc37
-rw-r--r--net-im/jabber/files/patch-jabberd_log.cc32
3 files changed, 70 insertions, 1 deletions
diff --git a/net-im/jabber/Makefile b/net-im/jabber/Makefile
index fad5f2abb058..b635aa247168 100644
--- a/net-im/jabber/Makefile
+++ b/net-im/jabber/Makefile
@@ -3,7 +3,7 @@
PORTNAME= jabber
PORTVERSION= 1.6.1.1
-PORTREVISION= 19
+PORTREVISION= 20
PORTEPOCH= 1
CATEGORIES= net-im ipv6
MASTER_SITES= http://download.jabberd.org/jabberd14/%SUBDIR%/
diff --git a/net-im/jabber/files/patch-jabberd_lib_xmlnode.cc b/net-im/jabber/files/patch-jabberd_lib_xmlnode.cc
new file mode 100644
index 000000000000..e09e74d2e44d
--- /dev/null
+++ b/net-im/jabber/files/patch-jabberd_lib_xmlnode.cc
@@ -0,0 +1,37 @@
+--- jabberd/lib/xmlnode.cc.orig 2007-04-07 19:43:18 UTC
++++ jabberd/lib/xmlnode.cc
+@@ -879,9 +879,9 @@ xmlnode xmlnode_get_tag(xmlnode parent,
+ xmlnode_list_item xmlnode_get_tags(xmlnode context_node, const char *path, xht namespaces, pool p) {
+ char *this_step = NULL;
+ const char *ns_iri = NULL;
+- char *next_step = NULL;
+- char *start_predicate = NULL;
+- char *end_predicate = NULL;
++ const char *next_step = NULL;
++ const char *start_predicate = NULL;
++ const char *end_predicate = NULL;
+ char *predicate = NULL;
+ char *end_prefix = NULL;
+ int axis = 0; /* 0 = child, 1 = parent, 2 = attribute */
+@@ -1830,13 +1830,14 @@ xmlnode xmlnode_select_by_lang(xmlnode_l
+ }
+
+ /* if language has a geographical veriant, get the language as well */
+- if (lang != NULL && strchr(lang, '-') != NULL) {
+- snprintf(general_lang, sizeof(general_lang), "%s", lang);
+- if (strchr(lang, '-') != NULL) {
+- strchr(lang, '-')[0] = 0;
+- } else {
+- general_lang[0] = 0;
+- }
++ if (lang != NULL) {
++#define MIN(a,b) ((a) < (b) ? (a) : (b))
++ size_t len = sizeof(general_lang);
++ const char *pos;
++ if ((pos = strchr(lang, '-')))
++ len = MIN(len, pos - lang + 1);
++
++ snprintf(general_lang, len, "%s", lang);
+ }
+
+ /* iterate the nodes */
diff --git a/net-im/jabber/files/patch-jabberd_log.cc b/net-im/jabber/files/patch-jabberd_log.cc
new file mode 100644
index 000000000000..4a1c37711404
--- /dev/null
+++ b/net-im/jabber/files/patch-jabberd_log.cc
@@ -0,0 +1,32 @@
+--- jabberd/log.cc.orig 2007-07-20 13:56:59 UTC
++++ jabberd/log.cc
+@@ -83,21 +83,22 @@ static char *debug_log_timestamp(void) {
+ * @return 1 if it should be logged, 0 if not
+ */
+ static inline int _debug_log_zonefilter(char const* zone) {
+- char *pos, c = '\0';
++ const char *pos;
++ char *tmp;
++ int ret = 1;
+ if(zone != NULL && debug__zones != NULL)
+ {
+ pos = strchr(zone,'.');
+ if(pos != NULL)
+ {
+- c = *pos;
+- *pos = '\0'; /* chop */
++ tmp = strndup(zone, pos - zone);
+ }
+- if(xhash_get(debug__zones,zone) == NULL)
+- return 0;
++ if(xhash_get(debug__zones, (pos ? tmp : zone)) == NULL)
++ ret = 0;
+ if(pos != NULL)
+- *pos = c; /* restore */
++ free(tmp);
+ }
+- return 1;
++ return ret;
+ }
+
+ /**