From 54de1d6ca94bc0f7ffac6ad721933caf4db46ed5 Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Mon, 2 Mar 2026 19:39:44 -0800 Subject: changes to compile with musl (avoid sbrk) --- exrecover.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'exrecover.c') diff --git a/exrecover.c b/exrecover.c index 17ba06f..e2fa677 100644 --- a/exrecover.c +++ b/exrecover.c @@ -106,6 +106,7 @@ extern int vsprintf(char *, const char *, va_list); #include "ex.h" #include "ex_temp.h" #include "ex_tty.h" +#include "brk_shim.h" #include #include @@ -220,7 +221,7 @@ main(int argc, char *argv[]) /* * Initialize as though the editor had just started. */ - fendcore = (line *) sbrk(0); + fendcore = (line *) shim_sbrk(0); dot = zero = dol = fendcore; one = zero + 1; endcore = fendcore - 2; @@ -259,7 +260,7 @@ main(int argc, char *argv[]) /* * Allocate space for the line pointers from the temp file. */ - if ((char *) sbrk(H.Flines * sizeof (line)) == (char *) -1) + if ((char *) shim_sbrk(H.Flines * sizeof (line)) == (char *) -1) /* * Good grief. */ -- cgit v1.2.3