diff options
author | Matthew Bauer <mjbauer95@gmail.com> | 2019-03-01 23:11:54 -0500 |
---|---|---|
committer | Matthew Bauer <mjbauer95@gmail.com> | 2019-04-26 21:54:47 -0400 |
commit | 2ecc1d1599f446579e0ba6e34fbb83296cc21ed4 (patch) | |
tree | 662afbe3f83d765399e0d5283ed25eaeca266f7a /pkgs/development/tools | |
parent | 7f08b28bbfa628efd5b3529802b4587d73f5f36b (diff) | |
download | nixlib-2ecc1d1599f446579e0ba6e34fbb83296cc21ed4.tar nixlib-2ecc1d1599f446579e0ba6e34fbb83296cc21ed4.tar.gz nixlib-2ecc1d1599f446579e0ba6e34fbb83296cc21ed4.tar.bz2 nixlib-2ecc1d1599f446579e0ba6e34fbb83296cc21ed4.tar.lz nixlib-2ecc1d1599f446579e0ba6e34fbb83296cc21ed4.tar.xz nixlib-2ecc1d1599f446579e0ba6e34fbb83296cc21ed4.tar.zst nixlib-2ecc1d1599f446579e0ba6e34fbb83296cc21ed4.zip |
stdenv/darwin: move secure-format patch to gnum4
This is the only derivation that needs it anymore.
Diffstat (limited to 'pkgs/development/tools')
-rw-r--r-- | pkgs/development/tools/misc/gnum4/darwin-secure-format.patch | 15 | ||||
-rw-r--r-- | pkgs/development/tools/misc/gnum4/default.nix | 3 |
2 files changed, 17 insertions, 1 deletions
diff --git a/pkgs/development/tools/misc/gnum4/darwin-secure-format.patch b/pkgs/development/tools/misc/gnum4/darwin-secure-format.patch new file mode 100644 index 000000000000..b14d8be6ef16 --- /dev/null +++ b/pkgs/development/tools/misc/gnum4/darwin-secure-format.patch @@ -0,0 +1,15 @@ +With format string strictness, High Sierra also enforces that %n isn't used +in dynamic format strings, but we should just disable its use on darwin in +general. + +--- a/lib/vasnprintf.c 2017-06-22 15:19:15.000000000 -0700 ++++ b/lib/vasnprintf.c 2017-06-22 15:20:20.000000000 -0700 +@@ -4869,7 +4869,7 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t * + #endif + *fbp = dp->conversion; + #if USE_SNPRINTF +-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) ++# if !defined(__APPLE__) && !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__)) + fbp[1] = '%'; + fbp[2] = 'n'; + fbp[3] = '\0'; diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index f477d42fcf14..afe9b59e012d 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -13,7 +13,8 @@ stdenv.mkDerivation rec { configureFlags = [ "--with-syscmd-shell=${stdenv.shell}" ]; # Upstream is aware of it; it may be in the next release. - patches = [ ./s_isdir.patch ] ++ stdenv.lib.optional stdenv.hostPlatform.isDarwin stdenv.secure-format-patch; + patches = [ ./s_isdir.patch ] + ++ stdenv.lib.optional stdenv.isDarwin ./darwin-secure-format.patch; meta = { homepage = https://www.gnu.org/software/m4/; |