View Issue Details

IDProjectCategoryView StatusLast Update
0001636libmicrohttpdbuild systempublic2011-02-15 12:19
Reporterdmeister Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.4 
Summary0001636: Linking fails von Mac OS X 10.6
DescriptionLinking of libmicrohttpd on Mac OS X 10.6 fails in version 0.9.4 (probably since r14081) with the following message
<<
Undefined symbols:
  "_strndup", referenced from:
      _MHD_basic_auth_get_username_password in digestauth.o
<<
The function strndup is not available on the Mac platform.
Additional InformationA fast workaround could be:

--- digestauth.c.orig 2011-01-01 17:05:14.000000000 +0100
+++ digestauth.c 2011-01-01 17:05:48.000000000 +0100
@@ -689,7 +689,11 @@
       free(decode);
       return NULL;
     }
- user = strndup(decode, separator - decode);
+ user = strdup(decode);
+ if (strlen(user) >= separator - decode) {
+ // truncate
+ user[separator - decode] = 0;
+ }
   if (password != NULL)
     {
       *password = strdup(separator + 1);

but probably such an issue should be handled by autotools, but I have no experience with them.
TagsNo tags attached.

Activities

Christian Grothoff

2011-01-05 15:25

manager   ~0004225

Fixed in SVN 14114.

Issue History

Date Modified Username Field Change
2011-01-01 17:07 dmeister New Issue
2011-01-05 15:25 Christian Grothoff Note Added: 0004225
2011-01-05 15:25 Christian Grothoff Status new => resolved
2011-01-05 15:25 Christian Grothoff Resolution open => fixed
2011-01-05 15:25 Christian Grothoff Assigned To => Christian Grothoff
2011-02-15 12:19 Christian Grothoff Status resolved => closed