This patch provides an update so that nhc98 can be built and works with a modern C compiler (GCC 11) and libc (glibc 2.33). diff --git a/Makefile.inc b/Makefile.inc index 4fbd47a..5bce5c9 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -1,6 +1,10 @@ ### Configurable variables: -OPT = -O3 +# We want C89 semantics plus C++-style comments and things like the +# 'setjmp_buf' and 'u_short' types. More importantly, build with '-O1' +# only to avoid modern optimizations that break the code. +OPT = -O1 -std=gnu89 -D_GNU_SOURCE=1 + #ARCH = -m32 ARCH = diff --git a/script/nhc98heap.c b/script/nhc98heap.c index 534010e..a30d5cd 100644 --- a/script/nhc98heap.c +++ b/script/nhc98heap.c @@ -1,5 +1,6 @@ #include #include +#include main(int argc, char **argv) { int prefix = 1; diff --git a/src/runtime/Kernel/collector.c b/src/runtime/Kernel/collector.c index b95a273..1f879c5 100644 --- a/src/runtime/Kernel/collector.c +++ b/src/runtime/Kernel/collector.c @@ -2,6 +2,7 @@ #include #include #include +#include #include "node.h" /*#include "newmacros.h" -- already included in node.h */ /*#include "runtime.h" -- already included in node.h */ cdba113dfe4d99de18b8cc81301'>treecommitdiff
08-27
AgeCommit message (Expand)Author
2023-10-22gnu: patman: Apply patch for new Change-Id setting....Maxim Cournoyer
2023-05-01.patman: Remove get_maintainer_script option....Maxim Cournoyer
2023-02-25.patman: Ignore bad tags....Maxim Cournoyer
2022-12-28.patman: New configuration file....Maxim Cournoyer
Thank Eric Hanchrow.Ludovic Courtès
2015-07-23Thank Anders.Ludovic Courtès
2015-07-22Thank Malcolm.Ludovic Courtès
2015-07-22Thank Dave.Ludovic Courtès
2015-07-04Clean up 'THANKS' and 'AUTHORS'....Alex Kost
2015-06-07Thank Thomas.Ludovic Courtès