diff --git a/machine.h b/machine.h index fd882229..b6d4a825 100644 --- a/machine.h +++ b/machine.h @@ -74,7 +74,7 @@ struct sfp_port i2c_bus_t i2c; }; -typedef struct machine { +struct machine { char machine_name[30]; uint8_t isRTL8373; // Lowest logical port number @@ -102,7 +102,7 @@ typedef struct machine { uint32_t mac_flash_offset; }; -typedef struct machine_runtime +struct machine_runtime { uint8_t isRTL8373 : 1; uint8_t isN : 1; diff --git a/test/Makefile b/test/Makefile index 66702b70..550cea3b 100644 --- a/test/Makefile +++ b/test/Makefile @@ -12,9 +12,12 @@ CC = gcc SRCROOT = .. # -include shim first so __xdata/__code/__banked vanish before any firmware header. CFLAGS = -std=gnu11 -g -O1 -Wall -Wextra -Wno-unused-parameter -Wno-unknown-pragmas \ - -Wno-builtin-declaration-mismatch -DRTLP_HOST_TEST \ + -DRTLP_HOST_TEST \ -fsanitize=address,undefined -fno-omit-frame-pointer \ -include sdcc_shim.h -I. -I$(SRCROOT) -I$(SRCROOT)/httpd -I$(SRCROOT)/uip +ifeq ($(findstring clang,$(shell $(CC) --version 2>/dev/null)),) +CFLAGS += -Wno-builtin-declaration-mismatch +endif LDFLAGS = -fsanitize=address,undefined BUILDDIR = build