Index: Makefile ================================================================== --- Makefile +++ Makefile @@ -1,8 +1,8 @@ CC = gcc CFLAGS = -Wall -Werror -W -pthread -O3 -LDFLAGS = -pthread +LDFLAGS = -pthread -static LIBS = -lpthread filed: filed.o $(CC) $(CFLAGS) $(LDFLAGS) -o "$@" $^ $(LIBS) Index: filed.c ================================================================== --- filed.c +++ filed.c @@ -16,10 +16,11 @@ /* Default values */ #define MAX_FAILURE_COUNT 30 #define PORT 8080 #define THREAD_COUNT 10 #define BIND_ADDR "::" +#define CACHE_SIZE 8192 /* Arguments for worker threads */ struct filed_worker_thread_args { int fd; }; @@ -35,11 +36,11 @@ char *type; }; /* Global variables */ struct filed_fileinfo *filed_fileinfo_fdcache; -unsigned int filed_fileinfo_fdcache_size = 8192; +unsigned int filed_fileinfo_fdcache_size = CACHE_SIZE; /* Initialize process */ static int filed_init(void) { unsigned int idx; int mutex_init_ret;