fixes to cross-compile for ARM
am: 2faf06ef5a
* commit '2faf06ef5a888cef078a70c1a3a91f673004ef5c':
fixes to cross-compile for ARM
diff --git a/Makefile b/Makefile
index 731c31d..36df59c 100644
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,8 @@
obj ?= ./build
CROSS_COMPILE ?=
-CC = $(CROSS_COMPILE)gcc
-AR = $(CROSS_COMPILE)ar
+CC ?= $(CROSS_COMPILE)gcc
+AR ?= $(CROSS_COMPILE)ar
HOST_SOURCES =
SOURCES = ActivateCredential.c
diff --git a/NVMem.c b/NVMem.c
index 2a1d184..aae25ba 100644
--- a/NVMem.c
+++ b/NVMem.c
@@ -85,7 +85,7 @@
assert(ftell(s_NVFile) == NV_MEMORY_SIZE);
// read NV file data to memory
fseek(s_NVFile, 0, SEEK_SET);
- fread(s_NV, NV_MEMORY_SIZE, 1, s_NVFile);
+ assert(1 == fread(s_NV, NV_MEMORY_SIZE, 1, s_NVFile));
}
#endif
// NV contents have been read and the error checks have been performed. For