Some systems do not define GLOB_ABORTED and GLOB_NOMATCH.
Signed-off-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
---
git.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
applies-to: c20dc1194fcfa73a7bf6e9d315c878d4f8c2828a 57cce66195a824221c0e9517ff4999daf2fbe2d2
Show changes to git.c +4 −0
diff --git a/git.c b/git.c index 583923d..30b3c04 100644 --- a/git.c +++ b/git.c @@ -77,13 +77,17 @@ static void list_commands(const char *ex case GLOB_NOSPACE: puts("Out of memory when running glob()"); exit(2); +#ifdef GLOB_ABORTED case GLOB_ABORTED: printf("'%s': Read error: %s\n", exec_path, strerror(errno)); exit(2); +#endif +#ifdef GLOB_NOMATCH case GLOB_NOMATCH: printf("No git commands available in '%s'.\n", exec_path); printf("Do you need to specify --exec-path or set GIT_EXEC_PATH?\n"); exit(1); +#endif } for (i = 0; i < gl.gl_pathc; i++) { --- 0.99.9.GIT