apiaryio / drafter

API Blueprint Parser (C++)
https://apiblueprint.org/
MIT License
301 stars 54 forks source link

Compile error with newer gcc #799

Open pprkut opened 1 year ago

pprkut commented 1 year ago

I'm trying to compile drafter 5.1.0 with gcc 13.2.0 / glibc 2.37 and get this error:

/tmp/drafter-5.1.0/packages/drafter/src/utils/so/JsonIo.cc: In function ‘ItO {anonymous}::escape_json_string(ItI, ItI, ItO)’:
/tmp/drafter-5.1.0/packages/drafter/src/utils/so/JsonIo.cc:88:26: error: ‘uint8_t’ is not a member of ‘std’; did you mean ‘wint_t’?
   88 |                     std::uint8_t c = static_cast<std::uint8_t>(byte);
      |                          ^~~~~~~
      |                          wint_t
/tmp/drafter-5.1.0/packages/drafter/src/utils/so/JsonIo.cc:89:25: error: ‘c’ was not declared in this scope
   89 |                     if (c > 0x1f) { // non-control
      |                         ^