Skip to content

fix issue with PRIu64 on some compilers, by including sys/types.h early#320

Open
AuxLoui wants to merge 1 commit intointel:mainfrom
AuxLoui:main
Open

fix issue with PRIu64 on some compilers, by including sys/types.h early#320
AuxLoui wants to merge 1 commit intointel:mainfrom
AuxLoui:main

Conversation

@AuxLoui
Copy link
Copy Markdown

@AuxLoui AuxLoui commented Apr 13, 2026

Fix for #207 (PRIu64 problem)

@thiagomacieira thiagomacieira changed the title Main fix issue with PRIu64 on some compilers, by including sys/types.h early Apr 13, 2026
Copy link
Copy Markdown
Member

@thiagomacieira thiagomacieira left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Feedback on making commits and making PRs (general, not about this one in particular):

  • the commit message should explain why you're making a change. If you have an error message, it's often useful to include it.
  • you don't need to explain the what you're changing, because we can read diffs
  • the first line of the commit is the "subject" and should be a summary, which we can see in one-line logs (e.g. https://github.com/intel/tinycbor/commits/main/)
  • some projects require that you include a signed-off-by footer. We don't insist for TinyCBOR, but I would prefer it is there.
  • each commit should be a single, logical/semantic change, which doesn't break the build
  • the GitHub PR page is a summary of all commits in the change. If there's only one commit, then just copy the commit message and body (GitHub will do it for you).

Comment on lines +32 to +33
// Include sys/types.h before inttypes.h to work around issue with
// certain versions of GCC and newlib which causes omission of PRIx64
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The comment wasn't necessary. But I'll allow it.

However, is this high enough? Imagine something changes in the headers above and breaks? Especially cbor.h, which includes stdint.h.

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