diff options
author | Nick Sanders <nsanders@google.com> | 2015-09-09 22:36:53 -0700 |
---|---|---|
committer | Nick Sanders <nsanders@google.com> | 2015-09-09 22:36:53 -0700 |
commit | 279816931fafe7dbffb0169185e9ac360144aad7 (patch) | |
tree | 0b05aa85052e074fba885d64bc2d5ea5860dfad1 | |
parent | c5e4b50511dcc560623d4e0292a694739394f2b9 (diff) | |
download | stressapptest-279816931fafe7dbffb0169185e9ac360144aad7.tar.gz |
MNC update
Fix C++11 naming conflict with bind
Fix libc++ target to current android spec
Fix header defines for pthread barriers in libc++
Change-Id: I8ed20838828365b5d734ae8fb81a0eddde1c5ef3
Signed-off-by: Nick Sanders <nsanders@google.com>
-rw-r--r-- | Android.mk | 2 | ||||
-rw-r--r-- | src/stressapptest_config_android.h | 3 | ||||
-rw-r--r-- | src/worker.cc | 2 |
3 files changed, 5 insertions, 2 deletions
@@ -22,6 +22,6 @@ LOCAL_MODULE:= stressapptest LOCAL_MODULE_TAGS := optional LOCAL_CFLAGS := -DHAVE_CONFIG_H -DANDROID -DNDEBUG -UDEBUG -DCHECKOPTS LOCAL_CPP_EXTENSION := .cc -LOCAL_CXX_STL := stlport +LOCAL_CXX_STL := libc++ include $(BUILD_EXECUTABLE) diff --git a/src/stressapptest_config_android.h b/src/stressapptest_config_android.h index 83a4866..3817bdf 100644 --- a/src/stressapptest_config_android.h +++ b/src/stressapptest_config_android.h @@ -57,6 +57,9 @@ /* Define to 1 if you have the <pthread.h> header file. */ #define HAVE_PTHREAD_H 1 +/* Android, why do you define _POSIX_BARRIERS when you have no _POSIX_BARRIERS?! */ +#undef _POSIX_BARRIERS + /* Define to 1 if you have the `rand_r' function. */ /* #undef HAVE_RAND_R */ diff --git a/src/worker.cc b/src/worker.cc index dcf4dcb..62b0ede 100644 --- a/src/worker.cc +++ b/src/worker.cc @@ -2066,7 +2066,7 @@ bool NetworkListenThread::Listen() { sa.sin_addr.s_addr = INADDR_ANY; sa.sin_port = htons(kNetworkPort); - if (-1 == bind(sock_, (struct sockaddr*)&sa, sizeof(struct sockaddr))) { + if (-1 == ::bind(sock_, (struct sockaddr*)&sa, sizeof(struct sockaddr))) { char buf[256]; sat_strerror(errno, buf, sizeof(buf)); logprintf(0, "Process Error: Cannot bind socket: %s\n", buf); |