Merge branch 'dt/refs-check-refname-component-sse'
[gitweb.git] / git-compat-util.h
index b6f03b36dc762b891e77a5ca44e7ca5f270c5af9..96f55547a379bc1bdc488fa4557360bbfd1ae253 100644 (file)
@@ -685,6 +685,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