diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-01-04 15:34:08 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-01-04 15:34:08 +0000 |
commit | 883043bc14322a65c858a811be0980eace443d5f (patch) | |
tree | d5b5ff69e76a99e68a30bd78f118b19fbffd473b | |
parent | Add __attribute__((unused)) to unused function args. (diff) | |
download | rtems-883043bc14322a65c858a811be0980eace443d5f.tar.bz2 |
Use external scandir if available.
-rw-r--r-- | cpukit/libcsupport/src/scandir.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/cpukit/libcsupport/src/scandir.c b/cpukit/libcsupport/src/scandir.c index 827402988f..a111dea5c4 100644 --- a/cpukit/libcsupport/src/scandir.c +++ b/cpukit/libcsupport/src/scandir.c @@ -51,6 +51,8 @@ static char sccsid[] = "@(#)scandir.c 5.10 (Berkeley) 2/23/91"; * struct dirent (through namelist). Returns -1 if there were any errors. */ +#ifndef HAVE_SCANDIR + #include <sys/types.h> #include <sys/stat.h> #include <dirent.h> @@ -84,7 +86,7 @@ scandir( register struct dirent **names = NULL; register size_t nitems = 0; struct stat stb; - long arraysz; + size_t arraysz; DIR *dirp = NULL; int i; @@ -163,3 +165,4 @@ alphasort( return(strcmp((*(struct dirent **)d1)->d_name, (*(struct dirent **)d2)->d_name)); } +#endif |