mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-03 13:28:44 +00:00
Fix FreeBSD build
This commit is contained in:
1 parent
f7fbcd2451
commit
32f3c48b65
4 files changed
+18
-7
No files matched your search
+13
-4
@@ -312,6 +312,7 @@ struct timeval {
|
||||
#include <inttypes.h>
|
||||
#include <limits.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#include <netinet/tcp.h>
|
||||
#include <signal.h>
|
||||
#include <stdarg.h>
|
||||
@@ -590,17 +591,24 @@ bool mg_log_prefix(int ll, const char *file, int line, const char *fname);
|
||||
void mg_log_set(const char *spec);
|
||||
void mg_log_set_callback(void (*fn)(const void *, size_t, void *), void *param);
|
||||
|
||||
// Let the compiler always see the log invocation in order to check parameters
|
||||
// For MG_ENABLE_LOG=0 case, the call will be optimised out, anyway
|
||||
|
||||
#if MG_ENABLE_LOG
|
||||
|
||||
#define LOG(level, args) \
|
||||
do { \
|
||||
if (mg_log_prefix((level), __FILE__, __LINE__, __func__)) mg_log args; \
|
||||
} while (0)
|
||||
|
||||
#else
|
||||
|
||||
#define LOG(level, args) \
|
||||
do { \
|
||||
(void) level; \
|
||||
if (0) mg_log args; \
|
||||
} while (0)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
@@ -983,11 +991,12 @@ long mg_tls_recv(struct mg_connection *, void *buf, size_t len);
|
||||
void mg_tls_handshake(struct mg_connection *);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#if MG_ENABLE_MBEDTLS
|
||||
|
||||
|
||||
|
||||
|
||||
#include <mbedtls/debug.h>
|
||||
#include <mbedtls/net_sockets.h>
|
||||
#include <mbedtls/ssl.h>
|
||||
|
||||
Reference in new issue
Block a user