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>
--- snap-aligner.orig/SNAPLib/Compat.cpp
+++ snap-aligner/SNAPLib/Compat.cpp
@@ -1186,7 +1186,7 @@
 _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;
--- snap-aligner.orig/SNAPLib/Compat.h
+++ snap-aligner/SNAPLib/Compat.h
@@ -77,7 +77,7 @@
 #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(...) {}
