Browse Source

- applied patch from sh@linux2go.dk (#1039)

References to FAM stat cache engine should be conditional

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1664 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.14
Marcus Rückert 15 years ago
parent
commit
e61146a740
  1. 2
      src/base.h
  2. 8
      src/configfile.c

2
src/base.h

@ -481,7 +481,9 @@ typedef struct {
enum { STAT_CACHE_ENGINE_UNSET,
STAT_CACHE_ENGINE_NONE,
STAT_CACHE_ENGINE_SIMPLE,
#ifdef HAVE_FAM_H
STAT_CACHE_ENGINE_FAM
#endif
} stat_cache_engine;
unsigned short enable_cores;
} server_config;

8
src/configfile.c

@ -218,13 +218,19 @@ static int config_insert(server *srv) {
srv->srvconf.stat_cache_engine = STAT_CACHE_ENGINE_SIMPLE;
} else if (buffer_is_equal_string(stat_cache_string, CONST_STR_LEN("simple"))) {
srv->srvconf.stat_cache_engine = STAT_CACHE_ENGINE_SIMPLE;
#ifdef HAVE_FAM_H
} else if (buffer_is_equal_string(stat_cache_string, CONST_STR_LEN("fam"))) {
srv->srvconf.stat_cache_engine = STAT_CACHE_ENGINE_FAM;
#endif
} else if (buffer_is_equal_string(stat_cache_string, CONST_STR_LEN("disable"))) {
srv->srvconf.stat_cache_engine = STAT_CACHE_ENGINE_NONE;
} else {
log_error_write(srv, __FILE__, __LINE__, "sb",
"server.stat-cache-engine can be one of \"disable\", \"simple\", \"fam\", but not:", stat_cache_string);
"server.stat-cache-engine can be one of \"disable\", \"simple\","
#ifdef HAVE_FAM_H
" \"fam\","
#endif
" but not:", stat_cache_string);
ret = HANDLER_ERROR;
}

Loading…
Cancel
Save