summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-05-05 19:30:47 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2014-05-05 19:30:47 +0000
commitf2c0f32887a46c11e350465c5a2db1e3d9edec1e (patch)
tree5232f248628836a921bd6dedc630ed5b87459296
parent8ec42bb203d48e917d8da4d925378b448416d09e (diff)
parent02a7c3a7c3462250e853460190f3bd330105971b (diff)
downloadsystem_core-f2c0f32887a46c11e350465c5a2db1e3d9edec1e.zip
system_core-f2c0f32887a46c11e350465c5a2db1e3d9edec1e.tar.gz
system_core-f2c0f32887a46c11e350465c5a2db1e3d9edec1e.tar.bz2
Merge "libcutils: win_sdk build issues"
-rw-r--r--libcutils/Android.mk15
-rw-r--r--libcutils/socket_inaddr_any_server.c2
-rw-r--r--libcutils/socket_loopback_server.c2
3 files changed, 14 insertions, 5 deletions
diff --git a/libcutils/Android.mk b/libcutils/Android.mk
index 405761c..2dcc965 100644
--- a/libcutils/Android.mk
+++ b/libcutils/Android.mk
@@ -77,7 +77,10 @@ LOCAL_MODULE := libcutils
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
LOCAL_LDLIBS := -lpthread
LOCAL_STATIC_LIBRARIES := liblog
-LOCAL_CFLAGS += $(hostSmpFlag) -Werror
+LOCAL_CFLAGS += $(hostSmpFlag)
+ifneq ($(HOST_OS),windows)
+LOCAL_CFLAGS += -Werror
+endif
include $(BUILD_HOST_STATIC_LIBRARY)
@@ -88,14 +91,20 @@ LOCAL_MODULE := lib64cutils
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
LOCAL_LDLIBS := -lpthread
LOCAL_STATIC_LIBRARIES := lib64log
-LOCAL_CFLAGS += $(hostSmpFlag) -m64 -Werror
+LOCAL_CFLAGS += $(hostSmpFlag) -m64
+ifneq ($(HOST_OS),windows)
+LOCAL_CFLAGS += -Werror
+endif
include $(BUILD_HOST_STATIC_LIBRARY)
# Tests for host
# ========================================================
include $(CLEAR_VARS)
LOCAL_MODULE := tst_str_parms
-LOCAL_CFLAGS += -DTEST_STR_PARMS -Werror
+LOCAL_CFLAGS += -DTEST_STR_PARMS
+ifneq ($(HOST_OS),windows)
+LOCAL_CFLAGS += -Werror
+endif
LOCAL_SRC_FILES := str_parms.c hashmap.c memory.c
LOCAL_STATIC_LIBRARIES := liblog
LOCAL_MODULE_TAGS := optional
diff --git a/libcutils/socket_inaddr_any_server.c b/libcutils/socket_inaddr_any_server.c
index f70d56b..6c849de 100644
--- a/libcutils/socket_inaddr_any_server.c
+++ b/libcutils/socket_inaddr_any_server.c
@@ -46,7 +46,7 @@ int socket_inaddr_any_server(int port, int type)
if(s < 0) return -1;
n = 1;
- setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n));
+ setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (const char *) &n, sizeof(n));
if(bind(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
close(s);
diff --git a/libcutils/socket_loopback_server.c b/libcutils/socket_loopback_server.c
index 5175e9c..71afce7 100644
--- a/libcutils/socket_loopback_server.c
+++ b/libcutils/socket_loopback_server.c
@@ -46,7 +46,7 @@ int socket_loopback_server(int port, int type)
if(s < 0) return -1;
n = 1;
- setsockopt(s, SOL_SOCKET, SO_REUSEADDR, &n, sizeof(n));
+ setsockopt(s, SOL_SOCKET, SO_REUSEADDR, (const char *) &n, sizeof(n));
if(bind(s, (struct sockaddr *) &addr, sizeof(addr)) < 0) {
close(s);