diff options
Diffstat (limited to 'cmd-line-utils')
-rw-r--r-- | cmd-line-utils/libedit/readline.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd-line-utils/libedit/readline.c b/cmd-line-utils/libedit/readline.c index 863ee064ab0..9069b46d1f8 100644 --- a/cmd-line-utils/libedit/readline.c +++ b/cmd-line-utils/libedit/readline.c @@ -1239,7 +1239,7 @@ filename_completion_function(const char *text, int state) /* otherwise, get first entry where first */ /* filename_len characters are equal */ if (entry->d_name[0] == filename[0] -#if defined(__SVR4) || defined(__linux__) +#ifdef HAVE_DIRENT_H && strlen(entry->d_name) >= filename_len #else && entry->d_namlen >= filename_len @@ -1252,7 +1252,7 @@ filename_completion_function(const char *text, int state) if (entry) { /* match found */ struct stat stbuf; -#if defined(__SVR4) || defined(__linux__) +#ifdef HAVE_DIRENT_H len = strlen(entry->d_name) + #else len = entry->d_namlen + |