Previous versions up to 1.6 compiled fine.
cd src && make CC='gcc' CPPFLAGS='' DEFS='-DHAVE_CONFIG_H
-DSYSTEM_WGETRC=\"/usr/etc/wgetrc\" -DLOCA
LEDIR=\"/usr/share/locale\"' CFLAGS='-O2 -fomit-frame-pointer -march=pentium
-mcpu=pentium -pipe' LD
FLAGS='-s' LIBS='' prefix='/usr' exec_prefix='/usr' bindir='/usr/bin'
infodir='/usr/info' mandir='/u
sr/man' manext='1'
make[1]: Entering directory `/usr/src/wget-1.7/src'
gcc -I. -I. -DHAVE_CONFIG_H -DSYSTEM_WGETRC=\"/usr/etc/wgetrc\"
-DLOCALEDIR=\"/usr/share/locale\"
-O2 -fomit-frame-pointer -march=pentium -mcpu=pentium -pipe -c utils.c
utils.c: In function `read_file':
utils.c:980: `MAP_FAILED' undeclared (first use in this function)
utils.c:980: (Each undeclared identifier is reported only once
utils.c:980: for each function it appears in.)
make[1]: *** [utils.o] Error 1
make[1]: Leaving directory `/usr/src/wget-1.7/src'
make: *** [src] Error 2
System information:
uname -a
Linux cheetah.parsons.org 2.4.5-ac6 #1 Fri Jun 1 22:34:22 EDT 2001 i586 unknown
gcc -v
Reading specs from /usr/lib/gcc-lib/i586-pc-linux-gnulibc1/2.95.3/specs
gcc version 2.95.3 20010315 (release)
library: libc.so.5.4.46
find /usr/src/linux -name \*.[ch] | xargs grep -2 MAP_FAILED
Only kernel occurrence is in UserModeLinux:
./arch/um/kernel/process.c:
process.c- if((stack = mmap(NULL, page_size(),
process.c- PROT_READ | PROT_WRITE | PROT_EXEC,
process.c: MAP_PRIVATE | MAP_ANONYMOUS, -1, 0)) == MAP_FAILED)
process.c- { perror("get_one_stack : couldn't mmap stack");
(So UML probably will not compile either.)
Excerpt from /usr/include/asm/mman.h has no MAP_FAILED:
#define PROT_READ 0x1 /* page can be read */
#define PROT_WRITE 0x2 /* page can be written */
#define PROT_EXEC 0x4 /* page can be executed */
#define PROT_NONE 0x0 /* page can not be accessed */
#define MAP_SHARED 0x01 /* Share changes */
#define MAP_PRIVATE 0x02 /* Changes are private */
#define MAP_TYPE 0x0f /* Mask for type of mapping */
#define MAP_FIXED 0x10 /* Interpret addr exactly */
#define MAP_ANONYMOUS 0x20 /* don't use a file */
#define MAP_GROWSDOWN 0x0100 /* stack-like segment */
#define MAP_DENYWRITE 0x0800 /* ETXTBSY */
#define MAP_EXECUTABLE 0x1000 /* mark it as an executable */
#define MAP_LOCKED 0x2000 /* pages are locked */
#define MAP_NORESERVE 0x4000 /* don't check for reservations */
#define MS_ASYNC 1 /* sync memory asynchronously */
#define MS_INVALIDATE 2 /* invalidate the caches */
#define MS_SYNC 4 /* synchronous memory sync */
Is there an easy way to solve this compile problem?
Thanks,
Don Parsons