apache
Function ap_get_server_module_loglevel is not declared when !HAVE_SYSLOG
In case feature HAVE_SYSLOG is disabled, the include "http_config.h" does not happen. Because the .h file contains prototypes to functions like ap_get_server_module_loglevel, the compiler raises an undeclared function.
Bug fixed by commit 0900800fbab
Type | UndefinedSymbol |
Config | "!HAVE_SYSLOG" (1st degree) |
Fix-in | code |
Location | include/ |
#define APLOG_LEVELMASK 1 #define APLOG_NOTICE 2 #define APLOG_MAX 3 #ifdef HAVE_SYSLOG //#include "http_config.h" contains ap_get_server_module_loglevel() void ap_get_server_module_loglevel(); #if !defined(AP_DEBUG) #define ap_get_server_module_loglevel() do {} while(0) #endif /* AP_DEBUG */ #endif int main(void) { #ifndef APLOG_MAX_LOGLEVEL if (APLOG_LEVELMASK <= APLOG_NOTICE) ap_get_server_module_loglevel(); #else if (APLOG_LEVELMASK <= APLOG_MAX) ap_get_server_module_loglevel(); #endif return 0; }
. // if HAVE_SYSLOG is disabled . ERROR include/http_log.h:177:ap_get_server_module_loglevel()