Zefiro encountered the following compilation error:
>> utils.c: In function `read_file':
>> utils.c:980: `MAP_FAILED' undeclared (first use this function)

Ian Abott suggested:
> Try this patch:


> Press C-c C-c here to receive file transmission
 -=- MIME -=- 

--Message-Boundary-14934
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

On 31 Aug 2001, at 6:45, zefiro wrote:

> on my SUN-SPARC-SUNOS4.1.4, using GCC-2.8.0, after running the
> "configure" script (without any argument), I've run the "make"
> command (without any argument).
> It has been gone out with the following compilation Error:
> 
> gcc -I. -I.   -DHAVE_CONFIG_H
> -DSYSTEM_WGETRC=\"/usr/local/etc/wgetrc\"
> -DLOCALEDIR=\"/usr/local/share/locale\" -g -O2 -c utils.c
> utils.c: In function `read_file':
> utils.c:980: `MAP_FAILED' undeclared (first use this function)
> utils.c:980: (Each undeclared identifier is reported only once
> utils.c:980: for each function it appears in.)
> *** Error code 1

Try this patch:



--Message-Boundary-14934
Content-type: Application/Octet-stream; name="wget-1.7-MAP_FAILED.patch"; type=Text
Content-disposition: attachment; filename="wget-1.7-MAP_FAILED.patch"

--- src/utils.c.orig    Sun May 27 20:35:12 2001
+++ src/utils.c Fri Aug 31 17:07:40 2001
@@ -33,6 +33,9 @@
 #endif
 #ifdef HAVE_MMAP
 # include <sys/mman.h>
+# ifndef MAP_FAILED
+#  define MAP_FAILED ((void *)-1)
+# endif
 #endif
 #ifdef HAVE_PWD_H
 # include <pwd.h>

--Message-Boundary-14934--

Reply via email to