diff options
author | Alex Deymo <deymo@google.com> | 2015-12-09 18:19:00 -0800 |
---|---|---|
committer | Alex Deymo <deymo@google.com> | 2015-12-10 18:00:06 -0800 |
commit | 31276e68c85fa5320ed00c9e14143ffcc1925be3 (patch) | |
tree | f2c1515354655bf8f8a312f7c2cf896340fdc8b9 | |
parent | d240c7008fde86f7fcd4475d2b52de2332d905a5 (diff) | |
download | external_curl-31276e68c85fa5320ed00c9e14143ffcc1925be3.tar.gz external_curl-31276e68c85fa5320ed00c9e14143ffcc1925be3.tar.bz2 external_curl-31276e68c85fa5320ed00c9e14143ffcc1925be3.zip |
Compile libcurl for the host.
Bug: 24619596
TEST=mma
Change-Id: I0ec88cfc35690542abd029ce81255f34de3b8eb4
-rw-r--r-- | Android.mk | 20 | ||||
-rw-r--r-- | lib/cookie.c | 1 | ||||
-rw-r--r-- | lib/curl_config.h | 9 | ||||
-rw-r--r-- | lib/warnless.c | 1 |
4 files changed, 28 insertions, 3 deletions
@@ -40,6 +40,24 @@ include $(BUILD_STATIC_LIBRARY) ######################### # Build the libcurl shared library +libcurl_shared_libs := libcrypto libssl libz + +include $(CLEAR_VARS) +include $(LOCAL_PATH)/lib/Makefile.inc + +LOCAL_SRC_FILES := $(addprefix lib/,$(CSOURCES)) +LOCAL_C_INCLUDES := $(curl_includes) +LOCAL_CFLAGS := \ + $(curl_CFLAGS) \ + -D_GNU_SOURCE=1 +LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include + +LOCAL_MODULE:= libcurl-host +LOCAL_MODULE_TAGS := optional +LOCAL_SHARED_LIBRARIES := $(libcurl_shared_libs:=-host) + +include $(BUILD_HOST_SHARED_LIBRARY) + include $(CLEAR_VARS) include $(LOCAL_PATH)/lib/Makefile.inc @@ -50,7 +68,7 @@ LOCAL_EXPORT_C_INCLUDE_DIRS := $(LOCAL_PATH)/include LOCAL_MODULE:= libcurl LOCAL_MODULE_TAGS := optional -LOCAL_SHARED_LIBRARIES := libcrypto libssl libz +LOCAL_SHARED_LIBRARIES := $(libcurl_shared_libs) include $(BUILD_SHARED_LIBRARY) diff --git a/lib/cookie.c b/lib/cookie.c index 94f2a8b8..ea717a6f 100644 --- a/lib/cookie.c +++ b/lib/cookie.c @@ -79,7 +79,6 @@ Example set of cookies: 13-Jun-1988 03:04:55 GMT; domain=.fidelity.com; path=/; secure ****/ - #include "curl_setup.h" #if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES) diff --git a/lib/curl_config.h b/lib/curl_config.h index 88124ffe..434cf9b5 100644 --- a/lib/curl_config.h +++ b/lib/curl_config.h @@ -125,7 +125,10 @@ #define HAVE_BORINGSSL 1 /* Define to 1 if you have the clock_gettime function and monotonic timer. */ +#ifndef __APPLE__ +/* CLOCK_MONOTONIC is not defined in mac when building for the host. */ #define HAVE_CLOCK_GETTIME_MONOTONIC 1 +#endif /* Define to 1 if you have the closesocket function. */ /* #undef HAVE_CLOSESOCKET */ @@ -435,10 +438,14 @@ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the memrchr function or macro. */ +#ifndef __APPLE__ #define HAVE_MEMRCHR 1 +#endif /* Define to 1 if you have the MSG_NOSIGNAL flag. */ +#ifndef __APPLE__ #define HAVE_MSG_NOSIGNAL 1 +#endif /* Define to 1 if you have the <netdb.h> header file. */ #define HAVE_NETDB_H 1 @@ -839,7 +846,7 @@ #define RETSIGTYPE void /* Define to the type qualifier of arg 5 for select. */ -#define SELECT_QUAL_ARG5 +#define SELECT_QUAL_ARG5 /* Define to the type of arg 1 for select. */ #define SELECT_TYPE_ARG1 int diff --git a/lib/warnless.c b/lib/warnless.c index 8d4bbdf5..9482b44f 100644 --- a/lib/warnless.c +++ b/lib/warnless.c @@ -22,6 +22,7 @@ #include "curl_setup.h" #include "stdint.h" +#include "limits.h" #if defined(__INTEL_COMPILER) && defined(__unix__) |