diff options
author | Theodore Ts'o <tytso@mit.edu> | 2003-04-13 00:44:19 -0400 |
---|---|---|
committer | Theodore Ts'o <tytso@mit.edu> | 2003-04-13 00:44:19 -0400 |
commit | fff45483ede7fe38a31b3364a9c07e2418776dee (patch) | |
tree | 4208ea0e5998cb0988b4543fe30ef00b091ddcf6 /lib/e2p/iod.c | |
parent | 61de7f84fbdfac5460b7037feb9633d4ab7ef513 (diff) | |
download | e2fsprogs-fff45483ede7fe38a31b3364a9c07e2418776dee.tar.gz |
Add portability enhancements for Cygwin32 environment.
Diffstat (limited to 'lib/e2p/iod.c')
-rw-r--r-- | lib/e2p/iod.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/lib/e2p/iod.c b/lib/e2p/iod.c index c5d34cd7..42e69d9d 100644 --- a/lib/e2p/iod.c +++ b/lib/e2p/iod.c @@ -54,11 +54,13 @@ int iterate_on_dir (const char * dir_name, return -1; } while ((dep = readdir (dir))) { - len = dep->d_reclen; - if (len < (sizeof(struct dirent))) - len = sizeof(struct dirent); + len = sizeof(struct dirent); +#ifdef HAVE_RECLEN_DIRENT + if (len < dep->d_reclen) + len = dep->d_reclen; if (len > max_len) len = max_len; +#endif memcpy(de, dep, len); (*func) (dir_name, de, private); } |