From 6c8b6387b495e8658e015db451e51faae536eb94 Mon Sep 17 00:00:00 2001 From: MysterD Date: Sun, 26 Mar 2023 14:53:01 -0700 Subject: [PATCH] Fix debug builds on linux --- Makefile | 2 +- src/pc/debuglog.h | 6 +++--- src/pc/network/version.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index ec11ddeb..276c1b2a 100644 --- a/Makefile +++ b/Makefile @@ -957,7 +957,7 @@ else ifeq ($(TARGET_RPI),1) LDFLAGS += -Llib/lua/linux -l:liblua53-arm.a endif else - LDFLAGS += -Llib/lua/linux -l:liblua53.a + LDFLAGS += -Llib/lua/linux -l:liblua53.a -ldl endif # Network/Discord/Bass (ugh, needs cleanup) diff --git a/src/pc/debuglog.h b/src/pc/debuglog.h index 13d30904..498310ed 100644 --- a/src/pc/debuglog.h +++ b/src/pc/debuglog.h @@ -42,8 +42,8 @@ static void _debuglog_print_log(char* logType, char* filename) { _debuglog_print_short_filename(filename); } -#define LOG_DEBUG(...) if (configDebugPrint) { ( _debuglog_print_log("DEBUG", __FILE__), printf(__VA_ARGS__), printf("\n") ); } -#define LOG_INFO(...) if (configDebugInfo) { ( _debuglog_print_log("INFO", __FILE__), printf(__VA_ARGS__), printf("\n") ); } -#define LOG_ERROR(...) if (configDebugError) { ( _debuglog_print_log("ERROR", __FILE__), printf(__VA_ARGS__), printf("\n") ); } +#define LOG_DEBUG(...) (configDebugPrint ? ( _debuglog_print_log("DEBUG", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0) +#define LOG_INFO(...) (configDebugInfo ? ( _debuglog_print_log("INFO", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0) +#define LOG_ERROR(...) (configDebugError ? ( _debuglog_print_log("ERROR", __FILE__), printf(__VA_ARGS__), printf("\n") ) : 0) #endif diff --git a/src/pc/network/version.h b/src/pc/network/version.h index 38900ce8..69094cdf 100644 --- a/src/pc/network/version.h +++ b/src/pc/network/version.h @@ -7,7 +7,7 @@ #define PATCH_VERSION_NUMBER 3 #define MAX_VERSION_LENGTH 10 -#define MAX_LOCAL_VERSION_LENGTH 11 +#define MAX_LOCAL_VERSION_LENGTH 12 char* get_version(void); char* get_version_local(void);