Commit 71a8204d380f02d379d85706ba1e1ec32d9e6c2c

Edward Thomson 2017-09-12T20:20:48

Merge pull request #4346 from pks-t/pks/wo-features-header features.h: allow building without CMake-generated feature header

diff --git a/src/common.h b/src/common.h
index 17b9c14..d3622d3 100644
--- a/src/common.h
+++ b/src/common.h
@@ -7,7 +7,10 @@
 #ifndef INCLUDE_common_h__
 #define INCLUDE_common_h__
 
-#include "git2/sys/features.h"
+#ifndef LIBGIT2_NO_FEATURES_H
+# include "git2/sys/features.h"
+#endif
+
 #include "git2/common.h"
 #include "cc-compat.h"
 
diff --git a/src/unix/posix.h b/src/unix/posix.h
index bfabd17..ee36ea0 100644
--- a/src/unix/posix.h
+++ b/src/unix/posix.h
@@ -7,7 +7,10 @@
 #ifndef INCLUDE_posix__unix_h__
 #define INCLUDE_posix__unix_h__
 
-#include "git2/sys/features.h"
+#ifndef LIBGIT2_NO_FEATURES_H
+# include "git2/sys/features.h"
+#endif
+
 #include <stdio.h>
 #include <dirent.h>
 #include <sys/param.h>