From 2cd1c2e7ad8dec1839d18af9d96e4d98458d2d5c Mon Sep 17 00:00:00 2001 From: Martijn Dekker Date: Sun, 31 Jul 2022 01:10:22 +0200 Subject: [PATCH] Fix build on macOS (re: 3389cab2) macOS doesn't like it if ast.h is included in vmmopen.c (conflicting type declarations for brk() and sbrk() between that file and the OS header), so only include ast.h when we're actually using the the NoN stub macro from it. Thanks to Mark Wilson for the build failure report. Resolves: https://github.com/ksh93/ksh/issues/499 --- src/lib/libast/vmalloc/vmmopen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/libast/vmalloc/vmmopen.c b/src/lib/libast/vmalloc/vmmopen.c index d08d0a78a..d02c21e9b 100644 --- a/src/lib/libast/vmalloc/vmmopen.c +++ b/src/lib/libast/vmalloc/vmmopen.c @@ -18,9 +18,9 @@ * * ***********************************************************************/ #include "FEATURE/vmalloc" -#include #if !_hdr_sys_shm +#include NoN(vmmapopen) #else