diff options
author | Darren Tucker <dtucker@zip.com.au> | 2006-09-01 20:29:10 +1000 |
---|---|---|
committer | Darren Tucker <dtucker@zip.com.au> | 2006-09-01 20:29:10 +1000 |
commit | 096faecdea1e39ecace0b20f4e208bd7ec33f6d2 (patch) | |
tree | 7756d6d5fefe40aab00431d47075175a5641b9a1 /openbsd-compat/glob.c | |
parent | 0646ca6be81c4f0f619d92a4e5a041b58c79a221 (diff) |
- (dtucker) [configure.ac includes.h openbsd-compat/glob.{c,h}] Explicitly
test for GLOB_NOMATCH and use our glob functions if it's not found.
Stops sftp from segfaulting when attempting to get a nonexistent file on
Cygwin (previous versions of OpenSSH didn't use the native glob). Partly
from and tested by Corinna Vinschen.
Diffstat (limited to 'openbsd-compat/glob.c')
-rw-r--r-- | openbsd-compat/glob.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index ec16b1108..b3dd2b171 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c | |||
@@ -47,7 +47,8 @@ | |||
47 | #include <unistd.h> | 47 | #include <unistd.h> |
48 | 48 | ||
49 | #if !defined(HAVE_GLOB) || !defined(GLOB_HAS_ALTDIRFUNC) || \ | 49 | #if !defined(HAVE_GLOB) || !defined(GLOB_HAS_ALTDIRFUNC) || \ |
50 | !defined(GLOB_HAS_GL_MATCHC) | 50 | !defined(GLOB_HAS_GL_MATCHC) || \ |
51 | !defined(HAVE_DECL_GLOB_NOMATCH) || HAVE_DECL_GLOB_NOMATCH == 0 | ||
51 | 52 | ||
52 | static long | 53 | static long |
53 | get_arg_max(void) | 54 | get_arg_max(void) |