summaryrefslogtreecommitdiff
path: root/expat/xmlwf/readfilemap.c
diff options
context:
space:
mode:
Diffstat (limited to 'expat/xmlwf/readfilemap.c')
-rw-r--r--expat/xmlwf/readfilemap.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/expat/xmlwf/readfilemap.c b/expat/xmlwf/readfilemap.c
index dd7543d8..4c4780bd 100644
--- a/expat/xmlwf/readfilemap.c
+++ b/expat/xmlwf/readfilemap.c
@@ -47,10 +47,12 @@
/* https://msdn.microsoft.com/en-us/library/wyssk1bs(v=vs.100).aspx */
# define _EXPAT_read _read
# define _EXPAT_read_count_t int
+# define _EXPAT_read_req_t unsigned int
#else /* POSIX */
/* http://pubs.opengroup.org/onlinepubs/009695399/functions/read.html */
# define _EXPAT_read read
# define _EXPAT_read_count_t ssize_t
+# define _EXPAT_read_req_t size_t
#endif
#ifndef S_ISREG
@@ -119,7 +121,7 @@ filemap(const tchar *name,
close(fd);
return 0;
}
- n = _EXPAT_read(fd, p, nbytes);
+ n = _EXPAT_read(fd, p, (_EXPAT_read_req_t)nbytes);
if (n < 0) {
tperror(name);
free(p);