summaryrefslogtreecommitdiff
path: root/test/misc
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2006-02-14 03:34:43 +0000
committerMike Frysinger <vapier@gentoo.org>2006-02-14 03:34:43 +0000
commit900ceefa3ca44e975e7d5aff5813f5ea54766f21 (patch)
tree260e6d464e2b5042e68cf12b529abfd8ceedf12a /test/misc
parent70f5583d2320aec03aba29d7647c362d042cc360 (diff)
allow for runtime testing
Diffstat (limited to 'test/misc')
-rw-r--r--test/misc/dirent.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/misc/dirent.c b/test/misc/dirent.c
index f8832f6bd..c8db2c83d 100644
--- a/test/misc/dirent.c
+++ b/test/misc/dirent.c
@@ -18,12 +18,12 @@ const char const *types[] = {
_DTIFY(DT_WHT)
};
-int main(int argc, char **argv)
+int main(int argc, char *argv[])
{
DIR *dirh;
struct dirent *de;
struct dirent64 *de64;
- const char const mydir[] = ".";
+ const char *mydir = (argc == 1 ? "/" : argv[1]);
if ((dirh = opendir(mydir)) == NULL) {
perror("opendir");