From 19e3bc6d24bd6c1516c720e1c476f72c3267d109 Mon Sep 17 00:00:00 2001 From: Wolfgang Hottgenroth Date: Thu, 11 Feb 2021 10:48:21 +0100 Subject: [PATCH] fix --- sink/Makefile | 10 +++++----- sink/sink20169.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/sink/Makefile b/sink/Makefile index ba92f62..b3e9feb 100644 --- a/sink/Makefile +++ b/sink/Makefile @@ -6,19 +6,19 @@ sink20169.c \ logging.c -OS := $(shell uname -s) - C_INCLUDES = \ -I. \ -I../cube/User/Inc CC = gcc -CFLAGS = $(C_INCLUDES) -Wall -Werror -std=c99 -DOS=$(OS) +CFLAGS = $(C_INCLUDES) -Wall -Werror -std=c99 LDFLAGS = -lconfig -lcurl TARGET = sink20169 -ifeq ($(OS),OpenBSD) - CFLAGS += -I/usr/local/include + +UNAME_S := $(shell uname -s) +ifeq ($(UNAME_S),OpenBSD) + CFLAGS += -I/usr/local/include -DOpenBSD=1 LDFLAGS += -L/usr/local/lib endif diff --git a/sink/sink20169.c b/sink/sink20169.c index 9fb022b..57af073 100644 --- a/sink/sink20169.c +++ b/sink/sink20169.c @@ -275,7 +275,7 @@ int forwardMinuteBuffer(t_forwarderHandle *handle, t_minuteBuffer *buf) { char payload[256]; int res = snprintf(payload, sizeof(payload), "%s,valid=1,location=%s,host=%s freq=%d.%03d" -#if OS = OpenBSD +#ifdef OpenBSD " %llu" #else " %lu"