Any suggestions?
Code: Select all
nl-filesys.c: In function 'p_spawn':
nl-filesys.c:1498:42: error: 'MAP_ANON' undeclared (first use in this function)
PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0)) == (void*)-1)
^
nl-filesys.c:1498:42: note: each undeclared identifier is reported only once for each function it appears in
nl-filesys.c: In function 'p_share':
nl-filesys.c:2152:55: error: 'MAP_ANON' undeclared (first use in this function)
0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANON, -1, 0)) == (void*)-1)
^
make[5]: *** [nl-filesys.o] Error 1
make[4]: *** [default] Error 2
make[3]: *** [/Volumes/OpenPipe/build_dir/target-i386_i486_uClibc-0.9.33.2/newlisp-10.6.2/.configured_] Error 2
make[3]: Leaving directory `/Volumes/OpenPipe/package/devel/newlisp'
make[2]: *** [package/devel/newlisp/compile] Error 2
make[2]: Leaving directory `/Volumes/OpenPipe'
make[1]: *** [/Volumes/OpenPipe/staging_dir/target-i386_i486_uClibc-0.9.33.2/stamp/.package_compile] Error 2
make[1]: Leaving directory `/Volumes/OpenPipe'
make: *** [world] Error 2
Code: Select all
# makefile for newLISP v.10.x.x on Openwrt LINUX without readline support
# I use upx to compress as hell as I can on newlisp
# Note, that readline support may require different libraries on different OSs
#
OBJS = newlisp.o nl-liststr.o nl-symbol.o pcre.o \
nl-debug.o nl-math.o nl-utf8.o unix-lib.o \
nl-filesys.o nl-matrix.o nl-web.o win32-path.o \
nl-import.o nl-sock.o nl-xml-json.o win32-util.o \
nl-list.o nl-string.o pcre-chartables.o win32dll.o
#CFLAGS = -Wall -pedantic -Wno-uninitialized -c -O2 -g -DLINUX
CFLAGS = -Wall -Wl,--gc-sections -ffunction-sections -fdata-sections \
-c -Os -fno-threadsafe-statics -DLINUX -I$(TARGET_DIR)/usr/include/ \
-std=gnu99
LDFLAGS = -L$(TARGET_DIR)/usr/lib/ -W1,--gc-sections -lm -ldl
CC = openwrt-linux-gcc
LD = openwrt-linux-ld
default: $(OBJS)
$(CC) $(OBJS) -o newlisp $(LDFLAGS) #for openwrt
# $(CC) $(OBJS) -g -lm -ldl -lreadline -ltermcap -o newlisp # slackware
# $(CC) $(OBJS) -g -lm -ldl -lreadline -lncurses -o newlisp # other Linux Dist
# $(CC) $(OBJS) -g -lm -ldl -o newlisp # without readline support
$(STRIP) newlisp
upx --best -o newlisp_s newlisp
rm newlisp
mv newlisp_s newlisp
.c.o:
$(CC) $(CFLAGS) $<
$(OBJS): primes.h protos.h pcre.h pcre-config.h