Commit e4ab29a1 authored by Greg Williams's avatar Greg Williams
Browse files

Added pthread to link dependencies for Make build for lib and example utility.

Added call to KineticLogger_Close in test_kinetic_allocator in order to ensure log buffer gets flushed prior to termination so that log data is not discarded
parent d249a001
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -13,7 +13,7 @@ OPTIMIZE = -O3
WARN = -Wall -Wextra -pedantic
CDEFS += -D_POSIX_C_SOURCE=1 -D_C99_SOURCE=1
CFLAGS += -std=c99 -fPIC -g $(WARN) $(CDEFS) $(OPTIMIZE)
LDFLAGS += -lm -l crypto -l ssl
LDFLAGS += -lm -l crypto -l ssl -l pthread

#===============================================================================
# Kinetic-C Library Build Support
@@ -199,7 +199,7 @@ UTILITY = kinetic-c-util
UTIL_DIR = ./src/utility
UTIL_EXEC = $(BIN_DIR)/$(UTILITY)
UTIL_OBJ = $(OUT_DIR)/main.o
UTIL_LDFLAGS += -lm -l ssl $(KINETIC_LIB) -l crypto
UTIL_LDFLAGS += -lm -l ssl $(KINETIC_LIB) -l crypto -l pthread

$(UTIL_OBJ): $(UTIL_DIR)/main.c
	$(CC) -c -o $@ $< $(CFLAGS) -I$(PUB_INC) -I$(UTIL_DIR)
+3 −0
Original line number Diff line number Diff line
@@ -48,6 +48,9 @@ void tearDown(void)
    LOG_LOCATION;
    bool allFreed = KineticAllocator_ValidateAllMemoryFreed(&PDUList);
    KineticAllocator_FreeAllPDUs(&PDUList);

    KineticLogger_Close();

    TEST_ASSERT_NULL(PDUList.start);
    TEST_ASSERT_NULL(PDUList.last);
    TEST_ASSERT_TRUE_MESSAGE(allFreed, "Dynamically allocated things were not freed!");