Fix compilation errors and warnings.

This commit is contained in:
levlam
2025-11-04 00:58:36 +03:00
parent dc0c7f3de4
commit 34fe0e7e31
7 changed files with 6 additions and 9 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -46,7 +46,7 @@ head -c 16 /dev/urandom | xxd -ps
./mtproto-proxy -u nobody -p 8888 -H 443 -S <secret> --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.
- `<secret>` is the secret generated at step 3. Also you can set multiple secrets: `-S <secret1> -S <secret2>`.
+1 -1
View File
@@ -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);
+1
View File
@@ -21,6 +21,7 @@
#pragma once
#include <pthread.h>
#include <stdlib.h>
#include <string.h>
#include <semaphore.h>
-1
View File
@@ -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;
+1 -4
View File
@@ -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);
+1 -1
View File
@@ -21,7 +21,7 @@
#include <assert.h>
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)