diff options
author | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:21 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2023-11-21 16:12:48 +0100 |
commit | 048a4cd441a59cbf89defb18bb45c9f0b4429b35 (patch) | |
tree | f8f5850ff05521ab82d65745894714a8796cbfb6 /pkgs/servers/dante | |
parent | 030c5028b07afcedce7c5956015c629486cc79d9 (diff) | |
parent | 4c2d05dd6435d449a3651a6dd314d9411b5f8146 (diff) | |
download | nixpkgs-rootfs.tar nixpkgs-rootfs.tar.gz nixpkgs-rootfs.tar.bz2 nixpkgs-rootfs.tar.lz nixpkgs-rootfs.tar.xz nixpkgs-rootfs.tar.zst nixpkgs-rootfs.zip |
Signed-off-by: Alyssa Ross <hi@alyssa.is>
Diffstat (limited to 'pkgs/servers/dante')
-rw-r--r-- | pkgs/servers/dante/clang-osint-m4.patch | 34 | ||||
-rw-r--r-- | pkgs/servers/dante/default.nix | 11 |
2 files changed, 42 insertions, 3 deletions
diff --git a/pkgs/servers/dante/clang-osint-m4.patch b/pkgs/servers/dante/clang-osint-m4.patch new file mode 100644 index 00000000000..65281e22ea0 --- /dev/null +++ b/pkgs/servers/dante/clang-osint-m4.patch @@ -0,0 +1,34 @@ +diff -ur a/osdep.m4 b/osdep.m4 +--- a/osdep.m4 2017-01-18 09:11:20.000000000 -0500 ++++ b/osdep.m4 2023-10-21 12:43:59.464797030 -0400 +@@ -381,6 +381,7 @@ + unset have_sa_len + AC_MSG_CHECKING([for sa_len in sockaddr]) + AC_TRY_COMPILE([ ++#include <stdint.h> + #include <sys/types.h> + #include <sys/socket.h> + ], [struct sockaddr sa; +@@ -397,12 +398,13 @@ + unset sa_len_type_found + for type in uint8_t "unsigned char"; do + AC_TRY_COMPILE([ ++#include <stdint.h> + #include <sys/types.h> + #include <sys/socket.h>], [ + struct sockaddr sa; + $type *sa_len_ptr; + sa_len_ptr = &sa.sa_len; +-sa_len_ptr++; /* use to avoid warning/error */], ++(*sa_len_ptr)++; /* use to avoid warning/error */], + [AC_DEFINE_UNQUOTED(sa_len_type, [$type], [sa_len type]) + sa_len_type_found=t + break]) +@@ -636,6 +638,7 @@ + in_port_t, in_addr_t], + , , + [ ++#include <stdint.h> + #include <sys/types.h> + #include <netinet/in.h> + ]) diff --git a/pkgs/servers/dante/default.nix b/pkgs/servers/dante/default.nix index 49e6a26f455..1d15bddc09f 100644 --- a/pkgs/servers/dante/default.nix +++ b/pkgs/servers/dante/default.nix @@ -18,16 +18,21 @@ stdenv.mkDerivation rec { configureFlags = if !stdenv.isDarwin then [ "--with-libc=libc.so.6" ] - else [ "--with-libc=libc${stdenv.targetPlatform.extensions.sharedLibrary}" ]; + else [ "--with-libc=libc${stdenv.hostPlatform.extensions.sharedLibrary}" ]; dontAddDisableDepTrack = stdenv.isDarwin; - patches = lib.optionals remove_getaddrinfo_checks [ + patches = [ + # Fixes several issues with `osint.m4` that causes incorrect check failures when using newer + # versions of clang: missing `stdint.h` for `uint8_t` and unused `sa_len_ptr`. + ./clang-osint-m4.patch + ] ++ lib.optionals remove_getaddrinfo_checks [ (fetchpatch { name = "0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch"; url = "https://raw.githubusercontent.com/buildroot/buildroot/master/package/dante/0002-osdep-m4-Remove-getaddrinfo-too-low-checks.patch"; sha256 = "sha256-e+qF8lB5tkiA7RlJ+tX5O6KxQrQp33RSPdP1TxU961Y="; - }) ]; + }) + ]; postPatch = '' substituteInPlace include/redefgen.sh --replace 'PATH=/bin:/usr/bin:/sbin:/usr/sbin' "" |