(I'm adding bug-gnulib to the discussion, maybe it can move over there completely.)
The forkpty code builds fine as a part of InetUtils on Mac OS X. I tried the gnulib self-checks for forkpty, but they failed: Making check in gltests make check-recursive make check-TESTS PASS: test-alignof PASS: test-errno PASS: test-fcntl-h PASS: test-fcntl-h-c++ forkpty returned -1 FAIL: test-forkpty openpty returned -1 FAIL: test-login_tty openpty returned -1 FAIL: test-openpty PASS: test-pty-c++ PASS: test-stddef PASS: test-stdint PASS: test-sys_ioctl PASS: test-sys_ioctl-c++ PASS: test-sys_socket PASS: test-sys_socket-c++ PASS: test-unistd PASS: test-unistd-c++ PASS: test-wchar PASS: test-wchar-c++ ==================== 3 of 18 tests failed ==================== This is from a package created with './gnulib-tool --dir m --create-testdir --with-tests forkpty' plus 'make dist' on my host, and then copying over to the Mac OS X system and building it. Thanks! /Simon