* commit '4520048535a980203125d830db3bba61222ac324': Undo mac fix to fix windows, fix mac differently.
This commit is contained in:
commit
b4c5b8f8ed
2 changed files with 5 additions and 3 deletions
|
|
@ -68,7 +68,7 @@ endif
|
||||||
# ========================================================
|
# ========================================================
|
||||||
LOCAL_MODULE := libcutils
|
LOCAL_MODULE := libcutils
|
||||||
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
|
LOCAL_SRC_FILES := $(commonSources) $(commonHostSources) dlmalloc_stubs.c
|
||||||
LOCAL_STATIC_LIBRARIES := liblog libbase
|
LOCAL_STATIC_LIBRARIES := liblog
|
||||||
ifneq ($(HOST_OS),windows)
|
ifneq ($(HOST_OS),windows)
|
||||||
LOCAL_CFLAGS += -Werror
|
LOCAL_CFLAGS += -Werror
|
||||||
endif
|
endif
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
#include "AvailabilityMacros.h" // For MAC_OS_X_VERSION_MAX_ALLOWED
|
#include "AvailabilityMacros.h" // For MAC_OS_X_VERSION_MAX_ALLOWED
|
||||||
#include <sys/syscall.h>
|
#include <sys/syscall.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include "base/logging.h"
|
|
||||||
#elif defined(__linux__) && !defined(__ANDROID__)
|
#elif defined(__linux__) && !defined(__ANDROID__)
|
||||||
#include <syscall.h>
|
#include <syscall.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -61,7 +60,10 @@ extern void thread_store_set( thread_store_t* store,
|
||||||
pid_t gettid() {
|
pid_t gettid() {
|
||||||
#if defined(__APPLE__)
|
#if defined(__APPLE__)
|
||||||
uint64_t owner;
|
uint64_t owner;
|
||||||
CHECK_PTHREAD_CALL(pthread_threadid_np, (NULL, &owner), __FUNCTION__);
|
int rc = pthread_threadid_np(NULL, &owner);
|
||||||
|
if (rc != 0) {
|
||||||
|
abort();
|
||||||
|
}
|
||||||
return owner;
|
return owner;
|
||||||
#elif defined(__linux__)
|
#elif defined(__linux__)
|
||||||
return syscall(__NR_gettid);
|
return syscall(__NR_gettid);
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue