From 2201b07a380bc800cfdb87482f58fe892b10165c Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 2 Nov 2020 14:56:06 +0000 Subject: [PATCH] Fix Linux compile bugs. --- DGIdGateway/Makefile | 4 ++-- YSFParrot/UDPSocket.cpp | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/DGIdGateway/Makefile b/DGIdGateway/Makefile index 78db036..e91ba18 100644 --- a/DGIdGateway/Makefile +++ b/DGIdGateway/Makefile @@ -2,11 +2,11 @@ CC = cc CXX = c++ # Use the following CFLAGS and LIBS if you don't want to use gpsd. -CFLAGS = -g -O3 -Wall -std=c++0x -pthread +CFLAGS = -g -O3 -Wall -DHAVE_LOG_H -std=c++0x -pthread LIBS = -lm -lpthread # Use the following CFLAGS and LIBS if you do want to use gpsd. -#CFLAGS = -g -O3 -Wall -DUSE_GPSD -std=c++0x -pthread +#CFLAGS = -g -O3 -Wall -DHAVE_LOG_H -DUSE_GPSD -std=c++0x -pthread #LIBS = -lm -lpthread -lgps LDFLAGS = -g diff --git a/YSFParrot/UDPSocket.cpp b/YSFParrot/UDPSocket.cpp index 510c8a2..ad8a0eb 100644 --- a/YSFParrot/UDPSocket.cpp +++ b/YSFParrot/UDPSocket.cpp @@ -28,6 +28,7 @@ #if defined(HAVE_LOG_H) #include "Log.h" #else +#define LogMessage(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #define LogError(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #define LogInfo(fmt, ...) ::fprintf(stderr, fmt "\n", ## __VA_ARGS__) #endif