com32/lib: fix warnings in opendir/readdir/closedir
authorH. Peter Anvin <hpa@zytor.com>
Sun, 10 Jan 2010 20:53:04 +0000 (12:53 -0800)
committerH. Peter Anvin <hpa@zytor.com>
Sun, 10 Jan 2010 20:53:04 +0000 (12:53 -0800)
Missing #include <stdlib.h>, nested comment in readdir.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
com32/lib/closedir.c
com32/lib/opendir.c
com32/lib/readdir.c

index f8bbbab..a2d1110 100644 (file)
@@ -10,6 +10,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <stdlib.h>
 
 int closedir(DIR * dir)
 {
index 6fc0f14..21fe91d 100644 (file)
@@ -10,6 +10,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <stdlib.h>
 
 DIR *opendir(const char *pathname)
 {
index 2ec7c7b..3737d1a 100644 (file)
@@ -10,6 +10,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <stdlib.h>
 
 struct dirent *readdir(DIR * dir)
 {
@@ -28,8 +29,10 @@ struct dirent *readdir(DIR * dir)
 
        __com32.cs_intcall(0x22, &regs, &regs);
 
-       /* Don't do this as we won't be able to rewind.
+#if 0
+       /* Don't do this as we won't be able to rewind. */
           dir->dd_fd = regs.esi.w[0];  /* Shouldn't be needed? */
+#endif
        if ((!(regs.eflags.l & EFLAGS_CF)) && (regs.esi.w[0] != 0)) {
            newde = calloc(1, sizeof(newde));
            if (newde != NULL) {