[OpenWrt-Devel] [PATCH 6/8] tools/firmware-utils: add cygwin compatibility

Rosen Penev rosenp at gmail.com
Mon Oct 7 21:02:23 EDT 2019


From: Alexey Loukianov <lx2 at lexa2.ru>

This patches mkheader_gemtek.c to handle endiannes on CYGWIN
hosts the same way it is handled on Linux.

Signed-off-by: Alexey Loukianov <lx2 at lexa2.ru>
Signed-off-by: Rosen Penev <rosenp at gmail.com>
---
 tools/firmware-utils/src/mkheader_gemtek.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/firmware-utils/src/mkheader_gemtek.c b/tools/firmware-utils/src/mkheader_gemtek.c
index 9e618efbad..65c41322d1 100644
--- a/tools/firmware-utils/src/mkheader_gemtek.c
+++ b/tools/firmware-utils/src/mkheader_gemtek.c
@@ -46,7 +46,7 @@
 # include <libkern/OSByteOrder.h>
 # define le32 OSSwapHostToLittleInt32
 #else
-# if defined(__linux__)
+# if (defined(__linux__) || defined(__CYGWIN__))
 #  include <endian.h>
 #  if __BYTE_ORDER == __BIG_ENDIAN
 #   define CPU_BIG_ENDIAN
-- 
2.17.1


_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list