diff --git a/Makefile b/Makefile index 67e6771..0800e65 100644 --- a/Makefile +++ b/Makefile @@ -12,7 +12,7 @@ ifeq ($m, 64) ARCH = -m64 endif -CFLAGS = $(ARCH) -O3 -std=gnu11 -Wall -mpclmul -march=core2 -mfpmath=sse -mssse3 -fno-strict-aliasing -fno-strict-overflow -fwrapv -DAES=1 -DCOMMIT=\"${COMMIT}\" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 +CFLAGS = $(ARCH) -O3 -std=gnu11 -Wall -Wno-array-bounds -mpclmul -march=core2 -mfpmath=sse -mssse3 -fno-strict-aliasing -fno-strict-overflow -fwrapv -DAES=1 -DCOMMIT=\"${COMMIT}\" -D_GNU_SOURCE=1 -D_FILE_OFFSET_BITS=64 LDFLAGS = $(ARCH) -ggdb -rdynamic -lm -lrt -lcrypto -lz -lpthread -lcrypto LIB = ${OBJ}/lib diff --git a/README.md b/README.md index 67ca9db..63bf965 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ head -c 16 /dev/urandom | xxd -ps ./mtproto-proxy -u nobody -p 8888 -H 443 -S --aes-pwd proxy-secret proxy-multi.conf -M 1 ``` ... where: -- `nobody` is the username. `mtproto-proxy` calls `setuid()` to drop privilegies. +- `nobody` is the username. `mtproto-proxy` calls `setuid()` to drop privileges. - `443` is the port, used by clients to connect to the proxy. - `8888` is the local port. You can use it to get statistics from `mtproto-proxy`. Like `wget localhost:8888/stats`. You can only get this stat via loopback. - `` is the secret generated at step 3. Also you can set multiple secrets: `-S -S `. diff --git a/common/resolver.h b/common/resolver.h index 084cf08..966ddc8 100644 --- a/common/resolver.h +++ b/common/resolver.h @@ -27,7 +27,7 @@ extern "C" { #endif -int kdb_hosts_loaded; +extern int kdb_hosts_loaded; int kdb_load_hosts (void); struct hostent *kdb_gethostbyname (const char *name); diff --git a/jobs/jobs.h b/jobs/jobs.h index 56522e5..f249a0a 100644 --- a/jobs/jobs.h +++ b/jobs/jobs.h @@ -21,6 +21,7 @@ #pragma once +#include #include #include #include diff --git a/mtproto/mtproto-proxy.c b/mtproto/mtproto-proxy.c index 4d749e1..dad762f 100644 --- a/mtproto/mtproto-proxy.c +++ b/mtproto/mtproto-proxy.c @@ -409,7 +409,6 @@ int worker_id, workers, slave_mode, parent_pid; int pids[MAX_WORKERS]; long long get_queries; -long long http_queries; int pending_http_queries; long long active_rpcs, active_rpcs_created; diff --git a/net/net-stats.c b/net/net-stats.c index 0453d9b..ee2ceeb 100644 --- a/net/net-stats.c +++ b/net/net-stats.c @@ -45,15 +45,13 @@ #include "net/net-connections.h" #include "net/net-config.h" #include "vv/vv-io.h" -#include "pid.h" +#include "common/pid.h" #include "common/common-stats.h" #include "net/net-msg-buffers.h" #include "engine/engine.h" -struct process_id PID; - extern int zheap_debug; long long queries_allocated; long long max_queries_allocated; @@ -66,7 +64,6 @@ int tl_rpc_op_stat __attribute__ ((weak)); int op_stat_write (stats_buffer_t *sb) __attribute__ ((weak)); int op_stat_write (stats_buffer_t *sb) { return 0; } - int my_pid; int connections_prepare_stat (stats_buffer_t *sb); diff --git a/vv/vv-tree.c b/vv/vv-tree.c index d7c4987..fa0eee3 100644 --- a/vv/vv-tree.c +++ b/vv/vv-tree.c @@ -21,7 +21,7 @@ #include -long long total_vv_tree_nodes; +extern long long total_vv_tree_nodes; #define SUFFIX2(a,b) a ## b #define SUFFIX(a,b) SUFFIX2(a,b)