diff options
author | H. Peter Anvin <hpa@zytor.com> | 2010-01-10 12:53:04 -0800 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2010-01-10 12:53:04 -0800 |
commit | 8682e180c7ecf747b6e9e4a65346dd0c779411c6 (patch) | |
tree | a052762e81fd59059aefe68b551ce602e66d86d8 /com32 | |
parent | 71d20885019564586d5f4d316af220cdae2900f5 (diff) | |
download | syslinux.git-8682e180c7ecf747b6e9e4a65346dd0c779411c6.tar.gz syslinux.git-8682e180c7ecf747b6e9e4a65346dd0c779411c6.tar.xz syslinux.git-8682e180c7ecf747b6e9e4a65346dd0c779411c6.zip |
com32/lib: fix warnings in opendir/readdir/closedir
Missing #include <stdlib.h>, nested comment in readdir.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32')
-rw-r--r-- | com32/lib/closedir.c | 1 | ||||
-rw-r--r-- | com32/lib/opendir.c | 1 | ||||
-rw-r--r-- | 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 f8bbbabd..a2d11105 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 6fc0f14f..21fe91d4 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 2ec7c7b3..3737d1ad 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, ®s, ®s); - /* 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) { |