diff options
author | Sergei Trofimovich <slyich@gmail.com> | 2023-05-29 21:30:31 +0100 |
---|---|---|
committer | Sergei Trofimovich <slyich@gmail.com> | 2023-05-29 21:31:13 +0100 |
commit | e10c33986ce73f4b103e9ab3203a5e11f4c850a1 (patch) | |
tree | b8e228c3a57e13fad51b39e53b23a493ca047c5f /pkgs/development/libraries/nss | |
parent | 5996187504b67d4d8d2359cc3fd397769b4028d2 (diff) |
nss_esr: backport gcc-13 fix
Without the change `nss` build on `gcc-13 `fails as: ../../cpputil/databuffer.h:20:20: error: 'uint8_t' does not name a type 20 | DataBuffer(const uint8_t* d, size_t l) : data_(nullptr), len_(0) { | ^~~~~~~ ../../cpputil/databuffer.h:14:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? 13 | #include <iostream> +++ |+#include <cstdint> 14 |
Diffstat (limited to 'pkgs/development/libraries/nss')
-rw-r--r-- | pkgs/development/libraries/nss/gcc-13-esr.patch | 44 | ||||
-rw-r--r-- | pkgs/development/libraries/nss/generic.nix | 5 |
2 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/libraries/nss/gcc-13-esr.patch b/pkgs/development/libraries/nss/gcc-13-esr.patch new file mode 100644 index 0000000000000..547ee0bd37618 --- /dev/null +++ b/pkgs/development/libraries/nss/gcc-13-esr.patch @@ -0,0 +1,44 @@ +https://bugzilla.mozilla.org/show_bug.cgi?id=1771273 +https://hg.mozilla.org/projects/nss/raw-rev/21e7aaa1f7d94bca15d997e5b4c2329b32fad21a + +# HG changeset patch +# User Sergei Trofimovich <slyich@gmail.com> +# Date 1653552519 0 +# Node ID 21e7aaa1f7d94bca15d997e5b4c2329b32fad21a +# Parent ad1046e9eee5f5dc17dac7c9343e2f7f0da44b4e +Bug 1771273 - cpputil/databuffer.h: add missing <cstdint> include r=nss-reviewers,mt + +Without the change build fails on this week's gcc-13 snapshot as: + + ../../cpputil/databuffer.h:20:20: error: 'uint8_t' does not name a type + 20 | DataBuffer(const uint8_t* d, size_t l) : data_(nullptr), len_(0) { + | ^~~~~~~ + ../../cpputil/databuffer.h:14:1: note: 'uint8_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'? + 13 | #include <iostream> + +++ |+#include <cstdint> + 14 | + +Differential Revision: https://phabricator.services.mozilla.com/D147404 + +diff --git a/cpputil/databuffer.h b/cpputil/databuffer.h +--- nss/cpputil/databuffer.h ++++ nss/cpputil/databuffer.h +@@ -6,16 +6,17 @@ + + #ifndef databuffer_h__ + #define databuffer_h__ + + #include <algorithm> + #include <cstring> + #include <iomanip> + #include <iostream> ++#include <cstdint> + + namespace nss_test { + + class DataBuffer { + public: + DataBuffer() : data_(nullptr), len_(0) {} + DataBuffer(const uint8_t* d, size_t l) : data_(nullptr), len_(0) { + Assign(d, l); + diff --git a/pkgs/development/libraries/nss/generic.nix b/pkgs/development/libraries/nss/generic.nix index be2196d6d2fc0..b2d1c1e15fd83 100644 --- a/pkgs/development/libraries/nss/generic.nix +++ b/pkgs/development/libraries/nss/generic.nix @@ -47,6 +47,11 @@ stdenv.mkDerivation rec { ./85_security_load_3.85+.patch ) ./fix-cross-compilation.patch + ] ++ lib.optionals (lib.versionOlder version "3.89") [ + # Backport gcc-13 build fix: + # https://bugzilla.mozilla.org/show_bug.cgi?id=1771273 + # https://hg.mozilla.org/projects/nss/raw-rev/21e7aaa1f7d94bca15d997e5b4c2329b32fad21a + ./gcc-13-esr.patch ]; patchFlags = [ "-p0" ]; |