summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2017-09-12 20:20:48 +0200
committerGitHub <noreply@github.com>2017-09-12 20:20:48 +0200
commit71a8204d380f02d379d85706ba1e1ec32d9e6c2c (patch)
tree12e0e6b106735d497d9d13c8a402a6f256ff1b9b
parent5b947b62970dc2adeb65fd875b1dc02e8f1b3579 (diff)
parent26f531d3a3c00890348660f826df4fd21e53f9c9 (diff)
downloadlibgit2-71a8204d380f02d379d85706ba1e1ec32d9e6c2c.tar.gz
Merge pull request #4346 from pks-t/pks/wo-features-header
features.h: allow building without CMake-generated feature header
-rw-r--r--src/common.h5
-rw-r--r--src/unix/posix.h5
2 files changed, 8 insertions, 2 deletions
diff --git a/src/common.h b/src/common.h
index 17b9c14e5..d3622d3eb 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 bfabd1707..ee36ea0f3 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>