diff options
Diffstat (limited to 'contrib/expat/xmlwf/unixfilemap.c')
-rw-r--r-- | contrib/expat/xmlwf/unixfilemap.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/expat/xmlwf/unixfilemap.c b/contrib/expat/xmlwf/unixfilemap.c index d0ce9cc60a8a..d2e0b174680b 100644 --- a/contrib/expat/xmlwf/unixfilemap.c +++ b/contrib/expat/xmlwf/unixfilemap.c @@ -10,7 +10,7 @@ Copyright (c) 2000 Clark Cooper <coopercc@users.sourceforge.net> Copyright (c) 2001-2002 Fred L. Drake, Jr. <fdrake@users.sourceforge.net> Copyright (c) 2006 Karl Waclawek <karl@waclawek.net> - Copyright (c) 2016-2017 Sebastian Pipping <sebastian@pipping.org> + Copyright (c) 2016-2025 Sebastian Pipping <sebastian@pipping.org> Copyright (c) 2017 Rhodri James <rhodri@wildebeest.org.uk> Licensed under the MIT license: @@ -41,6 +41,7 @@ #include <errno.h> #include <string.h> #include <stdio.h> +#include <stdlib.h> // NULL #include <unistd.h> #ifndef MAP_FILE @@ -93,8 +94,7 @@ filemap(const tchar *name, close(fd); return 1; } - p = (void *)mmap((void *)0, (size_t)nbytes, PROT_READ, MAP_FILE | MAP_PRIVATE, - fd, (off_t)0); + p = mmap(NULL, nbytes, PROT_READ, MAP_FILE | MAP_PRIVATE, fd, (off_t)0); if (p == (void *)-1) { tperror(name); close(fd); |