Skip to content

Commit 20811c5

Browse files
author
Nicolas Cavallari
committed
sysdir: Do not declare win32 functions on non-win32 platforms
These declaration poses problems on some embedded or retro Linux systems that deliberately disable support for wchar_t from their libc.
1 parent 8164b48 commit 20811c5

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/libgit2/sysdir.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,12 @@ extern int git_sysdir_set(git_sysdir_t which, const char *paths);
134134
*/
135135
extern int git_sysdir_reset(void);
136136

137+
#ifdef GIT_WIN32
137138
/** Sets the registry system dir to a mock; for testing. */
138139
extern int git_win32__set_registry_system_dir(const wchar_t *mock_sysdir);
139140

140141
/** Find the given system dir; for testing. */
141142
extern int git_win32__find_system_dirs(git_str *out, const char *subdir);
143+
#endif
142144

143145
#endif

0 commit comments

Comments
 (0)