Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[2.3 backport] src/libutil/json.cc: add missing <cstdint> include for gcc-13 #9190

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Conversation

trofi
Copy link
Contributor

@trofi trofi commented Oct 19, 2023

Without the change nix_2_3 build fails on this week's gcc-13 snapshot as:

src/libutil/json.cc: In function 'void nix::toJSON(std::ostream&, const char*, const char*)':
src/libutil/json.cc:33:22: error: 'uint16_t' was not declared in this scope
   33 |             put(hex[(uint16_t(*i) >> 12) & 0xf]);
      |                      ^~~~~~~~
src/libutil/json.cc:5:1: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
    4 | #include <cstring>
  +++ |+#include <cstdint>
    5 |

(cherry picked from commit b36d517)

Motivation

Context

Priorities

Add 👍 to pull requests you find important.

Without the change llvm build fails on this week's gcc-13 snapshot as:

    src/libutil/json.cc: In function 'void nix::toJSON(std::ostream&, const char*, const char*)':
    src/libutil/json.cc:33:22: error: 'uint16_t' was not declared in this scope
       33 |             put(hex[(uint16_t(*i) >> 12) & 0xf]);
          |                      ^~~~~~~~
    src/libutil/json.cc:5:1: note: 'uint16_t' is defined in header '<cstdint>'; did you forget to '#include <cstdint>'?
        4 | #include <cstring>
      +++ |+#include <cstdint>
        5 |

(cherry picked from commit b36d517)
@trofi trofi changed the title src/libutil/json.cc: add missing <cstdint> include for gcc-13 [2.3 backport] src/libutil/json.cc: add missing <cstdint> include for gcc-13 Oct 19, 2023
@edolstra edolstra merged commit 8e83671 into NixOS:2.3-maintenance Oct 19, 2023
4 of 6 checks passed
@trofi trofi deleted the 2.13-gcc-13 branch October 19, 2023 17:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants