Skip to content
Snippets Groups Projects
Commit f9bd1e05 authored by Kateryna Kostiuk's avatar Kateryna Kostiuk
Browse files

libressl: fix iOS build

OSByteOrder.h on macOS does not include the
required macro definitions. Applied the fix suggested
in https://github.com/libressl/portable/issues/1025.

Change-Id: I033fb5f405aed6fb8bcf859ea13bc8d3cb4959f1
parent e0002aa7
Branches
Tags
No related merge requests found
diff --git a/.DS_Store b/.DS_Store
index d154117..67f406e 100644
Binary files a/.DS_Store and b/.DS_Store differ
diff --git a/include/compat/endian.h b/include/compat/endian.h
index 5376c1a..2a318af 100644
--- a/include/compat/endian.h
+++ b/include/compat/endian.h
@@ -62,7 +62,7 @@
#endif
#endif
-#if defined(__APPLE__) && !defined(HAVE_ENDIAN_H)
+#if defined(__APPLE__) && !defined(be16toh)
#include <libkern/OSByteOrder.h>
#define be16toh(x) OSSwapBigToHostInt16((x))
#define htobe16(x) OSSwapHostToBigInt16((x))
@@ -74,7 +74,7 @@
#define htobe64(x) OSSwapHostToBigInt64(x)
#define le64toh(x) OSSwapLittleToHostInt64(x)
#define be64toh(x) OSSwapBigToHostInt64(x)
-#endif /* __APPLE__ && !HAVE_ENDIAN_H */
+#endif /* __APPLE__ && !be16toh */
#if defined(_WIN32) && !defined(HAVE_ENDIAN_H)
#include <winsock2.h>
......@@ -33,6 +33,9 @@ $(TARBALLS)/$(LIBRESSL_VERSION).tar.gz:
libressl: $(LIBRESSL_VERSION).tar.gz
$(UNPACK)
ifdef HAVE_IOS
$(APPLY) $(SRC)/libressl/ios-add-byte-order-macros.patch
endif
$(MOVE)
LIBRESSL_CONF := \
......@@ -50,6 +53,10 @@ ifeq ($(HOST_ARCH),arm-linux-gnueabihf)
LIBRESSL_CONF += -DCMAKE_SYSTEM_PROCESSOR=arm -DENABLE_ASM=Off -DCMAKE_C_FLAGS='-march=armv7-a -mfpu=neon-vfpv4 -mfloat-abi=hard'
endif
ifdef HAVE_IOS
LIBRESSL_CONF += -DCMAKE_SYSTEM_PROCESSOR=aarch64 -DENABLE_ASM=Off
endif
.libressl: libressl .sum-libressl
mkdir -p "$(PREFIX)/include"
ifdef HAVE_WIN32
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment