Fix build on FreeBSD

git-svn-id: https://svn.apache.org/repos/asf/harmony/enhanced/drlvm/trunk@796956 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/vm/gc_gen/src/common/gc_platform.h b/vm/gc_gen/src/common/gc_platform.h
index 586a659..66b6927 100644
--- a/vm/gc_gen/src/common/gc_platform.h
+++ b/vm/gc_gen/src/common/gc_platform.h
@@ -66,7 +66,7 @@
 #define prefetchnta(pref_addr)	_mm_prefetch((char*)(pref_addr), _MM_HINT_NTA )
 #endif /*ALLOC_PREFETCH*/
 
-#elif defined (__linux__)
+#elif defined (__linux__) || defined (FREEBSD)
 #define FORCE_INLINE inline  __attribute__((always_inline))
 
 #ifdef PREFETCH_SUPPORTED
diff --git a/vm/port/src/signals/linux/signals_common.cpp b/vm/port/src/signals/linux/signals_common.cpp
index cac9b5c..f78ea8b 100644
--- a/vm/port/src/signals/linux/signals_common.cpp
+++ b/vm/port/src/signals/linux/signals_common.cpp
@@ -268,9 +268,9 @@
 // For signals that must change their default behavior
 struct sig_redef
 {
-    int             signal;
-    sighandler_t    handler;
-    bool            set_up;
+    int     signal;
+    sig_t   handler;
+    bool    set_up;
 };
 
 static sig_redef signals_other[] =
@@ -278,7 +278,7 @@
     { SIGPIPE, SIG_IGN, false }
 };
 
-static sighandler_t old_handlers[sizeof(signals_other)/sizeof(signals_other[0])];
+static sig_t old_handlers[sizeof(signals_other)/sizeof(signals_other[0])];
 
 
 static void restore_signals()
diff --git a/vm/thread/src/thread_native_basic.c b/vm/thread/src/thread_native_basic.c
index 0bbc4e4..74c27e0 100644
--- a/vm/thread/src/thread_native_basic.c
+++ b/vm/thread/src/thread_native_basic.c
@@ -888,7 +888,7 @@
 } // hythread_set_state
 
 IDATA VMCALL hythread_get_thread_id_offset() {
-    return (U_32)&((HyThread *)0)->thread_id;
+    return (U_32)(size_t)&((HyThread *)0)->thread_id;
 } // hythread_get_thread_id_offset
 
 IDATA VMCALL hythread_set_thread_stop_callback(hythread_t thread,