aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorLinus Yang <laokongzi@gmail.com>2014-09-04 14:29:21 +0800
committerMemphiz <memphis@machzwo.de>2014-10-20 19:19:24 +0200
commit1824e76dab17e9632f46ac5f5d85a210f09d47b8 (patch)
tree212974bc39dfe73be8d31b33e7ecb02cf8f378dd /tools
parentd7ed419ba155a6df82a5252530308f96bac3cd92 (diff)
[ios] - fix libssh build with Xcode 6
Diffstat (limited to 'tools')
-rw-r--r--tools/depends/target/libssh/Makefile1
-rw-r--r--tools/depends/target/libssh/darwin.patch37
2 files changed, 38 insertions, 0 deletions
diff --git a/tools/depends/target/libssh/Makefile b/tools/depends/target/libssh/Makefile
index 930fe6a667..ae9d3f0f7e 100644
--- a/tools/depends/target/libssh/Makefile
+++ b/tools/depends/target/libssh/Makefile
@@ -21,6 +21,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
cd $(PLATFORM); patch -p0 < ../removelegacy.patch
cd $(PLATFORM); patch -p0 < ../android.patch
cd $(PLATFORM); patch -p0 < ../md5.patch
+ cd $(PLATFORM); patch -p1 < ../darwin.patch
sed -ie "s|-fstack-protector|-fnostack-protector|" "$(PLATFORM)/cmake/Modules/DefineCompilerFlags.cmake"
sed -ie "s|add_subdirectory(examples)||" "$(PLATFORM)/CMakeLists.txt"
cd $(PLATFORM)/build; $(CMAKE) -DWITH_STATIC_LIB=1 -DTHREADS_PTHREAD_ARG=0 VERBOSE=1 ..
diff --git a/tools/depends/target/libssh/darwin.patch b/tools/depends/target/libssh/darwin.patch
new file mode 100644
index 0000000000..3288d295f7
--- /dev/null
+++ b/tools/depends/target/libssh/darwin.patch
@@ -0,0 +1,37 @@
+diff --git a/include/libssh/misc.h b/include/libssh/misc.h
+index 9897c4e..fe4f602 100644
+--- a/include/libssh/misc.h
++++ b/include/libssh/misc.h
+@@ -35,8 +35,12 @@ int ssh_is_ipaddr_v4(const char *str);
+ int ssh_is_ipaddr(const char *str);
+
+ /* macro for byte ordering */
++#if !defined(ntohll)
+ uint64_t ntohll(uint64_t);
++#endif
++#if !defined(htonll)
+ #define htonll(x) ntohll(x)
++#endif
+
+ /* list processing */
+
+diff --git a/src/misc.c b/src/misc.c
+index 008be1b..3c2d8bb 100644
+--- a/src/misc.c
++++ b/src/misc.c
+@@ -286,6 +286,7 @@ int ssh_is_ipaddr(const char *str) {
+
+ #endif /* _WIN32 */
+
++#if !defined(ntohll)
+ uint64_t ntohll(uint64_t a) {
+ #ifdef WORDS_BIGENDIAN
+ return a;
+@@ -298,6 +299,7 @@ uint64_t ntohll(uint64_t a) {
+ return ((((uint64_t) low) << 32) | ( high));
+ #endif
+ }
++#endif
+
+ char *ssh_lowercase(const char* str) {
+ char *new, *p;