Compatibility fix. Apparently all system don't have d_namlen member
authorMarkus Kauppila <markus.kauppila@gmail.com>
Sat, 11 Jun 2011 08:11:03 -0700
changeset 5697 0dfe2e85dfd1
parent 5696 e902fa6e6960
child 5698 811b5480850e
Compatibility fix. Apparently all system don't have d_namlen member in their DIR struct.
test/test-automation/runner.c
--- a/test/test-automation/runner.c	Thu Jun 09 18:30:06 2011 +0300
+++ b/test/test-automation/runner.c	Sat Jun 11 08:11:03 2011 -0700
@@ -129,7 +129,7 @@
 	}
 
 	while(entry = readdir(directory)) {
-		if(entry->d_namlen > 2) { // discards . and ..
+		if(strlen(entry->d_name) > 2) { // discards . and ..
 			const char *delimiters = ".";
 			char *name = strtok(entry->d_name, delimiters);
 			char *ext = strtok(NULL, delimiters);