Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(476)

Unified Diff: base/logging.cc

Issue 118469: compile on openbsd: mostly ifdefs and missing includes,... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 11 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/logging.cc
===================================================================
--- base/logging.cc (revision 17958)
+++ base/logging.cc (working copy)
@@ -13,7 +13,7 @@
#include <mach/mach.h>
#include <mach/mach_time.h>
#include <mach-o/dyld.h>
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_OPENBSD)
#include <sys/syscall.h>
#include <time.h>
#endif
@@ -129,6 +129,8 @@
return mach_thread_self();
#elif defined(OS_LINUX)
return syscall(__NR_gettid);
+#elif defined(OS_OPENBSD)
+ return (int32)pthread_self();
#endif
}
@@ -137,7 +139,7 @@
return GetTickCount();
#elif defined(OS_MACOSX)
return mach_absolute_time();
-#elif defined(OS_LINUX)
+#elif defined(OS_LINUX) || defined(OS_OPENBSD)
struct timespec ts;
clock_gettime(CLOCK_MONOTONIC, &ts);

Powered by Google App Engine
This is Rietveld 408576698