diff -urN protobuf-2.4.1/gtest/include/gtest/internal/gtest-port.h protobuf-2.4.1-haiku/gtest/include/gtest/internal/gtest-port.h
--- protobuf-2.4.1/gtest/include/gtest/internal/gtest-port.h	2011-04-30 17:22:13.002359296 +0000
+++ protobuf-2.4.1-haiku/gtest/include/gtest/internal/gtest-port.h	2012-12-31 00:03:23.593756160 +0000
@@ -198,6 +198,8 @@
 #define GTEST_OS_MAC 1
 #elif defined __linux__
 #define GTEST_OS_LINUX 1
+#elif defined __HAIKU__
+#define GTEST_OS_HAIKU 1
 #elif defined __MVS__
 #define GTEST_OS_ZOS 1
 #elif defined(__sun) && defined(__SVR4)
@@ -205,7 +207,7 @@
 #endif  // __CYGWIN__
 
 #if GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC || GTEST_OS_SYMBIAN || \
-    GTEST_OS_SOLARIS
+    GTEST_OS_SOLARIS || GTEST_OS_HAIKU
 
 // On some platforms, <regex.h> needs someone to define size_t, and
 // won't compile otherwise.  We can #include it here as we already
@@ -236,7 +238,7 @@
 #define GTEST_USES_SIMPLE_RE 1
 
 #endif  // GTEST_OS_CYGWIN || GTEST_OS_LINUX || GTEST_OS_MAC ||
-        // GTEST_OS_SYMBIAN || GTEST_OS_SOLARIS
+        // GTEST_OS_SYMBIAN || GTEST_OS_SOLARIS || GTEST_OS_HAIKU
 
 // Defines GTEST_HAS_EXCEPTIONS to 1 if exceptions are enabled, or 0
 // otherwise.