Add more missing includes for byte swap operations
authorKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tue, 5 Oct 2021 19:45:24 +0000 (20:45 +0100)
committerKevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Tue, 5 Oct 2021 20:02:43 +0000 (21:02 +0100)
And fix a couple of spelling errors while we're here

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
src/mkporayfw.c
src/ptgen.c
src/trx.c
src/trx2edips.c

index 9efa31062989edddf65893a5a0508c111bf8fb4e..43c888552edd8029726639129d94d545c5e5f59f 100644 (file)
@@ -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>
index 665c5f7a04f341ff93e4ba951d60b8a044eec170..69757c1fc7dcb98b762e833de231ca82875d8712 100644 (file)
@@ -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>
index e09d671f0283554539cf4347148b9426b5f27dfc..4b7f778e26acead3a83454aa1c03611ab407f0e9 100644 (file)
--- 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);
index e8ac14d8302f3f415ce9bf815a647dd3b279e331..eca2fcc25dacfbe541a20d7cf89d3188a21fefe7 100644 (file)
@@ -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
 
 /**********************************************************************/