summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcus Rückert <darix@opensu.se>2007-02-19 13:55:07 +0000
committerMarcus Rückert <darix@opensu.se>2007-02-19 13:55:07 +0000
commitf1666a297c74ce333b5e32f5e136f57b0bca7d63 (patch)
treef0faeac02cae29de489968916bedcd9ebd1cd6fb
parentf12d9fc701140559eb7d12a54d5c903dc0defc9a (diff)
downloadlighttpd-git-f1666a297c74ce333b5e32f5e136f57b0bca7d63.tar.gz
- applied patch from sh@linux2go.dk (#1039)
References to FAM stat cache engine should be conditional git-svn-id: svn+ssh://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1664 152afb58-edef-0310-8abb-c4023f1b3aa9
-rw-r--r--src/base.h2
-rw-r--r--src/configfile.c8
2 files changed, 9 insertions, 1 deletions
diff --git a/src/base.h b/src/base.h
index d70fad00..a647f081 100644
--- a/src/base.h
+++ b/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;
diff --git a/src/configfile.c b/src/configfile.c
index 1d3d532f..5d9e00c5 100644
--- a/src/configfile.c
+++ b/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;
}