Description of problem: httpd does not support modules built with -D_FILE_OFFSET_BITS=64 When I remove -D_FILE_OFFSET_BITS=64 from CFLAGS, things work. With that flag I get segfaults. The module gets that flag automatically from mysql as pkg-config is used, so removing the flag requires some ugly hacks. Version-Release number of selected component (if applicable): httpd-2.2.3-11.el5_2 How reproducible: Well... Always if the flag is there. Steps to Reproduce: 1. Build a httpd module with -D_FILE_OFFSET_BITS=64 in CFLAGS. 2. Load the module in httpd configuration. 3. Request a page. Actual results: segfaults Expected results: things working :) Additional info: Not sure if httpd actually supports -D_FILE_OFFSET_BITS=64 or not (apr has some comments about it in configure/configure.in and CHANGES - under SOURCES/httpd-2.2.3/srclib/apr/). If it does, this could go away if httpd would be built with that flag? I already tried to set that flag in CFLAGS, but httpd doesn't take it. I didn't try to patch Makefile etc. so I didn't actually try what happens if the actual build takes the flag.
No, this is not supported. Redefining FILE_OFFSET_BITS affects the size of system types and hence can e.g. affect various structure sizes. I recommend you separate your module into multiple source files, to isolate the parts which need to interact with MySQL (and hence need _FILE_OFFSET_BITS=64.