View Issue Details

IDProjectCategoryView StatusLast Update
0002487libmicrohttpdbuild systempublic2012-07-24 01:04
Reporterruneks Assigned ToLRN  
PriorityhighSeverityblockReproducibilityalways
Status closedResolutionfixed 
Platformmingw32OSUbuntuOS Version12.04
Product Version0.9.20 
Target Version0.9.21Fixed in Version0.9.21 
Summary0002487: r22203 fails to build with --host=mingw32 because it introduces calls to fcntl without checking #ifndef MINGW
Descriptionr22203 breaks building libmicrohttpd with mingw32:

   /bin/bash ../../libtool --tag=CC --mode=compile i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/include/plibc -I../../src/include -I../../src/daemon -fno-strict-aliasing -I/home/rune/Streamers-build/ChunkerPlayer/external_libs/plibc/include -I/home/rune/Streamers-build/ChunkerPlayer/external_libs/pthreads/include -MT memorypool.lo -MD -MP -MF .deps/memorypool.Tpo -c -o memorypool.lo memorypool.c
   libtool: compile: i586-mingw32msvc-gcc -DHAVE_CONFIG_H -I. -I../.. -I../../src/include/plibc -I../../src/include -I../../src/daemon -fno-strict-aliasing -I/home/rune/Streamers-build/ChunkerPlayer/external_libs/plibc/include -I/home/rune/Streamers-build/ChunkerPlayer/external_libs/pthreads/include -MT memorypool.lo -MD -MP -MF .deps/memorypool.Tpo -c memorypool.c -DDLL_EXPORT -DPIC -o .libs/memorypool.o
   daemon.c: In function 'MHD_accept_connection':
   daemon.c:1156: error: 'F_GETFD' undeclared (first use in this function)
   daemon.c:1156: error: (Each undeclared identifier is reported only once
   daemon.c:1156: error: for each function it appears in.)
   daemon.c:1158: error: 'FD_CLOEXEC' undeclared (first use in this function)
   daemon.c:1159: error: 'F_SETFD' undeclared (first use in this function)
   daemon.c: In function 'create_socket':
   daemon.c:2014: error: 'F_GETFD' undeclared (first use in this function)
   daemon.c:2023: error: 'FD_CLOEXEC' undeclared (first use in this function)
   daemon.c:2026: error: 'F_SETFD' undeclared (first use in this function)
   make[4]: *** [daemon.lo] Error 1
   make[4]: *** Waiting for unfinished jobs....

This is caused by issuing calls to fcntl without wrapping these in a "#ifndef MINGW" clause and making the appropriate mingw-friendly ioctlsocket calls in the #else clause following the #ifndef (as is done elsewhere in the code where fcntl is used).
Steps To ReproduceGrab newest SVN (or anything later than or equal to r22203). Configure with --host=mingw32 (you'll need plibc and pthreads to make it build). make.
TagsNo tags attached.

Activities

Christian Grothoff

2012-07-08 15:07

manager   ~0006220

LRN says that his patches in SVN 22542 fix this.

Issue History

Date Modified Username Field Change
2012-07-08 01:37 runeks New Issue
2012-07-08 15:07 Christian Grothoff Note Added: 0006220
2012-07-08 15:07 Christian Grothoff Status new => resolved
2012-07-08 15:07 Christian Grothoff Fixed in Version => Git master
2012-07-08 15:07 Christian Grothoff Resolution open => fixed
2012-07-08 15:07 Christian Grothoff Assigned To => Christian Grothoff
2012-07-08 15:08 Christian Grothoff Assigned To Christian Grothoff => LRN
2012-07-08 15:08 Christian Grothoff Fixed in Version Git master => 0.9.21
2012-07-08 15:08 Christian Grothoff Target Version => 0.9.21
2012-07-24 01:04 Christian Grothoff Status resolved => closed