Merge branch 'jk/skip-prefix'
[gitweb.git] / git-compat-util.h
index d29e1dff08de9caa2b37eff71bffe7d37225796e..9de31807108322aac327f66822d4929974d7ffd5 100644 (file)
@@ -704,6 +704,17 @@ void git_qsort(void *base, size_t nmemb, size_t size,
 #endif
 #endif
 
+#if defined(__GNUC__) && defined(__x86_64__)
+#include <emmintrin.h>
+/*
+ * This is the system memory page size; it's used so that we can read
+ * outside the bounds of an allocation without segfaulting.
+ */
+#ifndef PAGE_SIZE
+#define PAGE_SIZE 4096
+#endif
+#endif
+
 #ifdef UNRELIABLE_FSTAT
 #define fstat_is_reliable() 0
 #else