diff options
author | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-01-06 23:08:30 +0000 |
---|---|---|
committer | Yury G. Kudryashov <urkud.urkud@gmail.com> | 2012-01-06 23:08:30 +0000 |
commit | 3ce77ab9c408e1b348f6d56c2a8af2f0e76df74f (patch) | |
tree | 201cfcc1d18cbbb75bb90d244c7073b9a5899503 /pkgs/development/libraries/openssl/cert-file-path-max.patch | |
parent | 26ea77ad65d009fa6715934860ec769ee10a56b1 (diff) | |
parent | 1401241864c48ebab0f3b8c2df446e0c3ba4a720 (diff) | |
download | nixlib-3ce77ab9c408e1b348f6d56c2a8af2f0e76df74f.tar nixlib-3ce77ab9c408e1b348f6d56c2a8af2f0e76df74f.tar.gz nixlib-3ce77ab9c408e1b348f6d56c2a8af2f0e76df74f.tar.bz2 nixlib-3ce77ab9c408e1b348f6d56c2a8af2f0e76df74f.tar.lz nixlib-3ce77ab9c408e1b348f6d56c2a8af2f0e76df74f.tar.xz nixlib-3ce77ab9c408e1b348f6d56c2a8af2f0e76df74f.tar.zst nixlib-3ce77ab9c408e1b348f6d56c2a8af2f0e76df74f.zip |
svn merge ^/nixpkgs/trunk
svn path=/nixpkgs/branches/libpng15/; revision=31386
Diffstat (limited to 'pkgs/development/libraries/openssl/cert-file-path-max.patch')
-rw-r--r-- | pkgs/development/libraries/openssl/cert-file-path-max.patch | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/pkgs/development/libraries/openssl/cert-file-path-max.patch b/pkgs/development/libraries/openssl/cert-file-path-max.patch new file mode 100644 index 000000000000..50621c5cb820 --- /dev/null +++ b/pkgs/development/libraries/openssl/cert-file-path-max.patch @@ -0,0 +1,34 @@ +This patch, to be applied after `cert-file.patch', fixes compilation +on GNU/Hurd where `PATH_MAX' is not defined. + +diff -ubB --show-c-function openssl-1.0.0e/crypto/x509/x509_def.c.orig openssl-1.0.0e/crypto/x509/x509_def.c +--- openssl-1.0.0e/crypto/x509/x509_def.c.orig 2012-01-06 00:08:48.000000000 +0100 ++++ openssl-1.0.0e/crypto/x509/x509_def.c 2012-01-06 00:11:29.000000000 +0100 +@@ -58,6 +58,7 @@ + + #include <stdio.h> + #include <stdlib.h> ++#include <string.h> + #include <limits.h> + #include <unistd.h> + #include <sys/types.h> +@@ -76,14 +77,16 @@ const char *X509_get_default_cert_dir(vo + + const char *X509_get_default_cert_file(void) + { +- static char buf[PATH_MAX] = X509_CERT_FILE; ++ static char *buf; + static int init = 0; + if (!init) { + init = 1; + char * s = getenv("OPENSSL_X509_CERT_FILE"); + if (s && getuid() == geteuid()) { +- strncpy(buf, s, sizeof(buf)); +- buf[sizeof(buf) - 1] = 0; ++ buf = strdup(s); ++ } ++ if (!s) { ++ buf = strdup(X509_CERT_FILE); + } + } + return buf; |