Description: Uses more liberal CPP defines to add compatibility to kfreebsd &
non-x86 systems
Author: Michael R. Crusoe <crusoe@ucdavis.edu> and Aaron M. Ucko <ucko@debian.org>
--- a/SNAPLib/Compat.cpp
+++ b/SNAPLib/Compat.cpp
@@ -1293,7 +1293,7 @@ _int64 timeInMillis()
 _int64 timeInNanos()
 {
     timespec ts;
-#if defined(__linux__)
+#if defined(_POSIX_TIMERS)  &&  _POSIX_TIMERS > 0
     clock_gettime(CLOCK_REALTIME, &ts); // Works on Linux
 #elif defined(__MACH__)
     clock_serv_t cclock;
--- a/SNAPLib/Compat.h
+++ b/SNAPLib/Compat.h
@@ -77,7 +77,7 @@ int getpagesize();
 #include <sched.h>  // For sched_setaffinity
 #endif
 
-#ifndef __APPLE__
+#if defined(__SSE__)  &&  !defined(__APPLE__)
 #include <xmmintrin.h>  // This is currently (in Dec 2013) broken on Mac OS X 10.9 (Apple clang-500.2.79)
 #else
 #define _mm_prefetch(...) {}
