From 78efbb99afdf2af98111e16fbf8d4a96b4eb8d7c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20Doozer=20S=C3=B8ndergaard=20Jensen?= Date: Thu, 12 Sep 2024 20:49:51 +0200 Subject: [PATCH] remove warnings and enable build on newer gcc --- src/Makefile | 2 +- src/pdclinux.c | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Makefile b/src/Makefile index 5f1d48a..ca63aab 100644 --- a/src/Makefile +++ b/src/Makefile @@ -30,7 +30,7 @@ STATIC= #PROFILE=-pg PROFILE= -COPTS=-c -Wall -Wextra -std=c11 -DOS_LINUX $(PROFILE) -flto +COPTS=-c -Wall -Wextra -std=c11 -DOS_LINUX -D_XOPEN_SOURCE=700 $(PROFILE) -flto ifeq ($(OPSYS),macos) COPTS+=-Oz -I/usr/local/opt/readline/include else diff --git a/src/pdclinux.c b/src/pdclinux.c index 92feacf..d725cf9 100644 --- a/src/pdclinux.c +++ b/src/pdclinux.c @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -548,7 +549,7 @@ PUBLIC void sys_sys_exp(struct exp_list *exproot, void **result, enum "SYS(sbrk) takes no further parameters"); *result = cell_alloc(INT_CPOOL); - **( (long **) result )=(long)sbrk(0); + **( (long **) result )=(long)malloc(0); *type = V_INT; } else if (strcmp(cmd, "now") == 0) { if (exproot->next)