diff options
author | Randy Eckenrode <randy@largeandhighquality.com> | 2023-10-08 18:06:27 -0400 |
---|---|---|
committer | Randy Eckenrode <randy@largeandhighquality.com> | 2023-10-10 08:03:49 -0400 |
commit | 68d0dfd07b54692bc3172d12fe153671f69ff946 (patch) | |
tree | 52d94cb7a81d270c072847bc118306a557857598 /pkgs/tools/misc/expect/fix-darwin-clang16.patch | |
parent | 6215da7844a24a209f3d3374086bdfc88f16765e (diff) | |
download | nixpkgs-68d0dfd07b54692bc3172d12fe153671f69ff946.tar nixpkgs-68d0dfd07b54692bc3172d12fe153671f69ff946.tar.gz nixpkgs-68d0dfd07b54692bc3172d12fe153671f69ff946.tar.bz2 nixpkgs-68d0dfd07b54692bc3172d12fe153671f69ff946.tar.lz nixpkgs-68d0dfd07b54692bc3172d12fe153671f69ff946.tar.xz nixpkgs-68d0dfd07b54692bc3172d12fe153671f69ff946.tar.zst nixpkgs-68d0dfd07b54692bc3172d12fe153671f69ff946.zip |
expect: fix build with clang 16
* Use patches from upstream issue tracker that fix most compilation issues and the configure script; and * Modify `exp_win.c` and `pty_termios.c` to build properly on Darwin.
Diffstat (limited to 'pkgs/tools/misc/expect/fix-darwin-clang16.patch')
-rw-r--r-- | pkgs/tools/misc/expect/fix-darwin-clang16.patch | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/tools/misc/expect/fix-darwin-clang16.patch b/pkgs/tools/misc/expect/fix-darwin-clang16.patch new file mode 100644 index 00000000000..9454769c99c --- /dev/null +++ b/pkgs/tools/misc/expect/fix-darwin-clang16.patch @@ -0,0 +1,31 @@ +diff -ur a/exp_win.c b/exp_win.c +--- a/exp_win.c 2018-02-02 14:15:52.000000000 -0500 ++++ b/exp_win.c 2023-10-10 07:47:33.082690432 -0400 +@@ -39,7 +39,8 @@ + /* Sigh. On AIX 2.3, termios.h exists but does not define TIOCGWINSZ */ + /* Instead, it has to come from ioctl.h. However, As I said above, this */ + /* can't be cavalierly included on all machines, even when it exists. */ +-#if defined(HAVE_TERMIOS) && !defined(HAVE_TIOCGWINSZ_IN_TERMIOS_H) ++/* Darwin also has termios.h, but it requires ioctl.h for `ioctl`. */ ++#if defined(HAVE_TERMIOS) && (defined(__APPLE__) || !defined(HAVE_TIOCGWINSZ_IN_TERMIOS_H)) + # include <sys/ioctl.h> + #endif + +diff -ur d/pty_termios.c c/pty_termios.c +--- d/pty_termios.c 2023-10-10 07:59:23.244452442 -0400 ++++ c/pty_termios.c 2023-10-10 08:00:35.303231582 -0400 +@@ -7,7 +7,13 @@ + + */ + +-#include <pty.h> /* openpty */ ++/* openpty */ ++#ifdef __APPLE__ ++#include <util.h> ++#else /* pty.h is Linux-specific */ ++#include <pty.h> ++#endif ++ + #include <stdio.h> + #include <signal.h> + |