pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/49764: net/wget won't build on Solaris



>Number:         49764
>Category:       pkg
>Synopsis:       net/wget won't build on Solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 20 07:20:00 +0000 2015
>Originator:     Brad Forschinger
>Release:        2014Q4
>Organization:
>Environment:
>Description:
uses strcasestr(), which doesn't exist in Solaris
>How-To-Repeat:

>Fix:

(lifted from http://notmuchmail.org/pipermail/notmuch/2010/002232.html)

--- iri.c.orig  Fri Mar 20 18:11:43 2015
+++ iri.c       Fri Mar 20 18:14:17 2015
@@ -46,6 +46,21 @@
 
 /* Note: locale encoding is kept in options struct (opt.locale) */
 
+#ifdef __sun
+static char *
+strcasestr(char *a, char *b)
+{
+  size_t l;
+  char f[3];
+  
+  snprintf(f, sizeof(f), "%c%c", tolower(*b), toupper(*b));
+  for (l = strcspn(a, f); l != strlen(a); l += strcspn(a + l + 1, f) + 1)
+    if (strncasecmp(a + l, b, strlen(b)) == 0)
+      return a + l;
+  return NULL;
+}
+#endif
+
 /* Given a string containing "charset=XXX", return the encoding if found,
    or NULL otherwise */
 char *



Home | Main Index | Thread Index | Old Index