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
This commit is contained in:
Martijn Dekker 2022-07-31 01:10:22 +02:00
parent 807863c29a
commit 2cd1c2e7ad
1 changed files with 1 additions and 1 deletions

View File

@ -18,9 +18,9 @@
* *
***********************************************************************/
#include "FEATURE/vmalloc"
#include <ast.h>
#if !_hdr_sys_shm
#include <ast.h>
NoN(vmmapopen)
#else