aboutsummaryrefslogtreecommitdiffstats
path: root/ex/ex_argv.c
diff options
context:
space:
mode:
Diffstat (limited to 'ex/ex_argv.c')
-rw-r--r--ex/ex_argv.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/ex/ex_argv.c b/ex/ex_argv.c
index d6f9a8bb8aa5..8b1fd7858fb1 100644
--- a/ex/ex_argv.c
+++ b/ex/ex_argv.c
@@ -611,9 +611,17 @@ argv_flt_path(SCR *sp, EXCMD *excp, CHAR_T *path, size_t plen)
if (nlen == 0) {
if (dp->d_name[0] == '.')
continue;
+#ifdef HAVE_DIRENT_D_NAMLEN
len = dp->d_namlen;
+#else
+ len = strlen(dp->d_name);
+#endif
} else {
+#ifdef HAVE_DIRENT_D_NAMLEN
len = dp->d_namlen;
+#else
+ len = strlen(dp->d_name);
+#endif
if (len < nlen || memcmp(dp->d_name, name, nlen))
continue;
}