View Issue Details

IDProjectCategoryView StatusLast Update
0001672libmicrohttpdportabilitypublic2011-04-27 16:15
Reporterrboulton Assigned ToChristian Grothoff  
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Product Version0.9.9 
Summary0001672: Compile error on OS X
DescriptionWhen attempting to compile on OS X (Snow Leopard), I get a compilation error in daemon.c:

Making all in daemon
/bin/sh ../../libtool --tag=CC --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/include/plibc -I../../src/include -I../../src/daemon -no-cpp-precomp -fno-common -fno-strict-aliasing -g -O2 -MT daemon.lo -MD -MP -MF .deps/daemon.Tpo -c -o daemon.lo daemon.c
libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/include/plibc -I../../src/include -I../../src/daemon -no-cpp-precomp -fno-common -fno-strict-aliasing -g -O2 -MT daemon.lo -MD -MP -MF .deps/daemon.Tpo -c daemon.c -fno-common -DPIC -o .libs/daemon.o
daemon.c: In function
TagsNo tags attached.
Attached Files
patch (491 bytes)   
diff --git a/libs/libmicrohttpd/src/daemon/daemon.c b/libs/libmicrohttpd/src/daemon/daemon.c
index 4ac6b12..b815b0f 100644
--- a/libs/libmicrohttpd/src/daemon/daemon.c
+++ b/libs/libmicrohttpd/src/daemon/daemon.c
@@ -941,7 +941,7 @@ MHD_add_connection (struct MHD_Daemon *daemon,
 #if OSX
 #ifdef SOL_SOCKET
 #ifdef SO_NOSIGPIPE
-  setsockopt (s, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof (on));
+  setsockopt (client_socket, SOL_SOCKET, SO_NOSIGPIPE, &on, sizeof (on));
 #endif
 #endif
 #endif
patch (491 bytes)   

Activities

Christian Grothoff

2011-04-03 14:04

manager   ~0004297

You're right. Fixed in SVN 14826.

Also, the warning is harmless/intentional --- the code may do something on some (32-bit) platforms, but not on your system, but it's a check against a possible integer overflow only, so the warning can be ignored.

Issue History

Date Modified Username Field Change
2011-04-02 23:47 rboulton New Issue
2011-04-02 23:47 rboulton File Added: patch
2011-04-03 14:04 Christian Grothoff Note Added: 0004297
2011-04-03 14:04 Christian Grothoff Status new => resolved
2011-04-03 14:04 Christian Grothoff Resolution open => fixed
2011-04-03 14:04 Christian Grothoff Assigned To => Christian Grothoff
2011-04-27 16:15 Christian Grothoff Status resolved => closed