#include <unistd.h>
#include <errno.h>
#include <inttypes.h>
+#include <pthread.h>
#include "ae.h" /* Event driven programming library */
#include "sds.h" /* Dynamic safe strings */
/* Global server state structure */
struct redisServer {
+ pthread_t mainthread;
int port;
int fd;
redisDb *db;