$OpenBSD: patch-LASzip_src_lasindex_cpp,v 1.1 2017/05/04 14:42:42 espie Exp $

Index: LASzip/src/lasindex.cpp
--- LASzip/src/lasindex.cpp.orig
+++ LASzip/src/lasindex.cpp
@@ -45,15 +45,19 @@
 #include "bytestreamout_file.hpp"
 
 #ifdef UNORDERED
-  // Check if on OS X and using cland (unordered map isn't part of tr1 namespace)
-  #if defined(__APPLE__) && defined(__clang__)
-    #include <unordered_map>
+   // Figure out whether <unordered_map> is in tr1
+#  ifdef __has_include
+#    if __has_include(<unordered_map>)
+#     include <unordered_map>
+      using namespace std;
+#     define UNORDERED_FOUND
+#    endif
+#  endif
+#  ifndef UNORDERED_FOUND
+#    include <tr1/unordered_map>
     using namespace std;
-  #else
-    #include <tr1/unordered_map>
-    using namespace std;
     using namespace tr1;
-  #endif
+#   endif
 typedef unordered_map<I32,U32> my_cell_hash;
 #else
 #include <hash_map>
