kilobyte/termrec

Build failure on Sonoma (Xcode 15.4) due to implicit `forkpty` declaration (`util.h`)

Opened this issue · 0 comments

Both master branch and 0.19 release fail to build on Sonoma (Xcode 15.4) due to implicit function declaration:

libtool: compile:  clang -DHAVE_CONFIG_H -I. -I./sys -I./libtty -I./common -Wno-parentheses -g -O2 -std=gnu11 -Wall -Wwrite-strings -Wstrict-prototypes -Wshadow -Wmissing-prototypes -Wno-unused-parameter -Wno-bitwise-op-parentheses -Wno-logical-op-parentheses -Wno-dangling-else -c sys/unix/ttysize.c -o sys/unix/ttysize.o >/dev/null 2>&1
rec/pty.c:211:13: error: call to undeclared function 'forkpty'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    switch (forkpty(&fd,0,0,(sx&&sy)?&ws:0))
            ^
1 error generated.
make[1]: *** [rec/pty.o] Error 1

Code may need to include util.h similar to how it is handling libutil.h.

Ref: https://github.com/apple-oss-distributions/Libc/blob/Libc-1592.100.35/include/util.h#L101