summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKevin Darbyshire-Bryant2021-10-05 19:45:24 +0000
committerKevin Darbyshire-Bryant2021-10-05 20:02:43 +0000
commitf9ad6b335e0fd699398370d4c6e2e45e1c459dea (patch)
treecf7625b84592d9c7d422ac80faede9a4c529d1ac
parent2f70fedc92bd08f9e182fcc388688f36310a597d (diff)
downloadfirmware-utils-f9ad6b335e0fd699398370d4c6e2e45e1c459dea.tar.gz
Add more missing includes for byte swap operations
And fix a couple of spelling errors while we're here Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
-rw-r--r--src/mkporayfw.c1
-rw-r--r--src/ptgen.c1
-rw-r--r--src/trx.c3
-rw-r--r--src/trx2edips.c3
4 files changed, 6 insertions, 2 deletions
diff --git a/src/mkporayfw.c b/src/mkporayfw.c
index 9efa310..43c8885 100644
--- a/src/mkporayfw.c
+++ b/src/mkporayfw.c
@@ -15,6 +15,7 @@
* Copyright (C) 2008,2009 Wang Jian <lark@linux.net.cn>
*/
+#include <byteswap.h>
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
diff --git a/src/ptgen.c b/src/ptgen.c
index 665c5f7..69757c1 100644
--- a/src/ptgen.c
+++ b/src/ptgen.c
@@ -10,6 +10,7 @@
* Copyright (C) 2010, Intel Corp. Huang Ying <ying.huang@intel.com>
*/
+#include <byteswap.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
diff --git a/src/trx.c b/src/trx.c
index e09d671..4b7f778 100644
--- a/src/trx.c
+++ b/src/trx.c
@@ -30,6 +30,7 @@
* Add option -2 to allow v2 header
*/
+#include <byteswap.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@@ -45,7 +46,7 @@
#define STORE32_LE(X) (X)
#define LOAD32_LE(X) (X)
#else
-#error unkown endianness!
+#error unknown endianness!
#endif
uint32_t crc32buf(char *buf, size_t len);
diff --git a/src/trx2edips.c b/src/trx2edips.c
index e8ac14d..eca2fcc 100644
--- a/src/trx2edips.c
+++ b/src/trx2edips.c
@@ -1,4 +1,5 @@
// SPDX-License-Identifier: GPL-2.0-only
+#include <byteswap.h>
#include <stdio.h>
#include <stdlib.h>
#include <stddef.h>
@@ -14,7 +15,7 @@
#define STORE32_LE(X) (X)
#define LOAD32_LE(X) (X)
#else
-#error unkown endianness!
+#error unknown endianness!
#endif
/**********************************************************************/