[syslinux:master] com32/lib: fix warnings in opendir/readdir/closedir

syslinux-bot for H. Peter Anvin hpa at zytor.com
Sun Jan 10 13:24:04 PST 2010


Commit-ID:  8682e180c7ecf747b6e9e4a65346dd0c779411c6
Gitweb:     http://syslinux.zytor.com/commit/8682e180c7ecf747b6e9e4a65346dd0c779411c6
Author:     H. Peter Anvin <hpa at zytor.com>
AuthorDate: Sun, 10 Jan 2010 12:53:04 -0800
Committer:  H. Peter Anvin <hpa at zytor.com>
CommitDate: Sun, 10 Jan 2010 12:53:04 -0800

com32/lib: fix warnings in opendir/readdir/closedir

Missing #include <stdlib.h>, nested comment in readdir.

Signed-off-by: H. Peter Anvin <hpa at zytor.com>


---
 com32/lib/closedir.c |    1 +
 com32/lib/opendir.c  |    1 +
 com32/lib/readdir.c  |    5 ++++-
 3 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/com32/lib/closedir.c b/com32/lib/closedir.c
index f8bbbab..a2d1110 100644
--- a/com32/lib/closedir.c
+++ b/com32/lib/closedir.c
@@ -10,6 +10,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <stdlib.h>
 
 int closedir(DIR * dir)
 {
diff --git a/com32/lib/opendir.c b/com32/lib/opendir.c
index 6fc0f14..21fe91d 100644
--- a/com32/lib/opendir.c
+++ b/com32/lib/opendir.c
@@ -10,6 +10,7 @@
 #include <string.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <stdlib.h>
 
 DIR *opendir(const char *pathname)
 {
diff --git a/com32/lib/readdir.c b/com32/lib/readdir.c
index 2ec7c7b..3737d1a 100644
--- a/com32/lib/readdir.c
+++ b/com32/lib/readdir.c
@@ -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) {



More information about the Syslinux-commits mailing list