diff options
Diffstat (limited to 'nixpkgs/pkgs/tools/networking/curl')
-rw-r--r-- | nixpkgs/pkgs/tools/networking/curl/configure-ipv6-autodetect.diff | 46 | ||||
-rw-r--r-- | nixpkgs/pkgs/tools/networking/curl/default.nix | 6 |
2 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/networking/curl/configure-ipv6-autodetect.diff b/nixpkgs/pkgs/tools/networking/curl/configure-ipv6-autodetect.diff new file mode 100644 index 000000000000..9797d2c16d11 --- /dev/null +++ b/nixpkgs/pkgs/tools/networking/curl/configure-ipv6-autodetect.diff @@ -0,0 +1,46 @@ +diff --git a/configure b/configure +index 04d1de1..5de1b41 100755 +--- a/configure ++++ b/configure +@@ -24949,15 +24949,12 @@ else $as_nop + # include <netinet/in6.h> + #endif + #endif +-#include <stdlib.h> /* for exit() */ +-main() ++ ++int main(void) + { + struct sockaddr_in6 s; + (void)s; +- if (socket(AF_INET6, SOCK_STREAM, 0) < 0) +- exit(1); +- else +- exit(0); ++ return socket(AF_INET6, SOCK_STREAM, 0) < 0; + } + + +diff --git a/configure.ac b/configure.ac +index 2d71c83..bd38dd9 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1679,15 +1679,12 @@ AS_HELP_STRING([--disable-ipv6],[Disable IPv6 support]), + # include <netinet/in6.h> + #endif + #endif +-#include <stdlib.h> /* for exit() */ +-main() ++ ++int main(void) + { + struct sockaddr_in6 s; + (void)s; +- if (socket(AF_INET6, SOCK_STREAM, 0) < 0) +- exit(1); +- else +- exit(0); ++ return socket(AF_INET6, SOCK_STREAM, 0) < 0; + } + ]]) + ], diff --git a/nixpkgs/pkgs/tools/networking/curl/default.nix b/nixpkgs/pkgs/tools/networking/curl/default.nix index 48bf59e25266..01208f0a121c 100644 --- a/nixpkgs/pkgs/tools/networking/curl/default.nix +++ b/nixpkgs/pkgs/tools/networking/curl/default.nix @@ -57,6 +57,12 @@ stdenv.mkDerivation (finalAttrs: { hash = "sha256-FsYqnErw9wPSi9pte783ukcFWtNBTXDexj4uYzbyqC0="; }; + patches = [ + # fix ipv6 autodetect compile error in configure script + # remove once https://github.com/curl/curl/pull/12607 released (8.6.0) + ./configure-ipv6-autodetect.diff + ]; + outputs = [ "bin" "dev" "out" "man" "devdoc" ]; separateDebugInfo = stdenv.isLinux; |