Skip to content

Commit 71a8204

Browse files
authored
Merge pull request libgit2#4346 from pks-t/pks/wo-features-header
features.h: allow building without CMake-generated feature header
2 parents 5b947b6 + 26f531d commit 71a8204

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

src/common.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
#ifndef INCLUDE_common_h__
88
#define INCLUDE_common_h__
99

10-
#include "git2/sys/features.h"
10+
#ifndef LIBGIT2_NO_FEATURES_H
11+
# include "git2/sys/features.h"
12+
#endif
13+
1114
#include "git2/common.h"
1215
#include "cc-compat.h"
1316

src/unix/posix.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@
77
#ifndef INCLUDE_posix__unix_h__
88
#define INCLUDE_posix__unix_h__
99

10-
#include "git2/sys/features.h"
10+
#ifndef LIBGIT2_NO_FEATURES_H
11+
# include "git2/sys/features.h"
12+
#endif
13+
1114
#include <stdio.h>
1215
#include <dirent.h>
1316
#include <sys/param.h>

0 commit comments

Comments
 (0)