diff options
author | Tom Smeding <tom.smeding@gmail.com> | 2019-12-10 10:26:24 +0100 |
---|---|---|
committer | Tom Smeding <tom.smeding@gmail.com> | 2019-12-10 10:26:24 +0100 |
commit | 4dbf651bc15a11ce7995c88c4b48a4050e762da5 (patch) | |
tree | 2c1976ddb2ec3b93fb0aba0066a1a647e5a0406d | |
parent | c1d0008f6820ee51b32734597247433ccd84a259 (diff) |
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | main.c | 3 |
2 files changed, 4 insertions, 3 deletions
@@ -1,11 +1,11 @@ CC = gcc -CFLAGS = -Wall -Wextra -std=c11 -fwrapv -fPIC +CFLAGS = -Wall -Wextra -std=c11 -fwrapv -fPIC -pthread ifneq ($(DEBUG),) CFLAGS += -g else CFLAGS += -O2 endif -LDFLAGS = -ldl +LDFLAGS = -ldl -pthread BIN = cserver PLUGINDIR = plugins @@ -5,6 +5,7 @@ #include <sys/socket.h> #include <netinet/in.h> #include <arpa/inet.h> +#include <stdint.h> #include <unistd.h> #include <dlfcn.h> #include <errno.h> @@ -65,7 +66,7 @@ static void load_plugin(const char *name){ static void* thread_entry_connection_handler(void *sock_){ - int sock=(int)sock_; + int sock=(int)(uintptr_t)sock_; Headers *headers=http_get_headers(sock); if(headers==NULL){ |