Skip to content

fix: make utp_types.h safer and compatible with cgo/Go builds#32

Merged
anacrolix merged 2 commits into
anacrolix:masterfrom
0rteip:fix/utp-types-go-compat
Nov 20, 2025
Merged

fix: make utp_types.h safer and compatible with cgo/Go builds#32
anacrolix merged 2 commits into
anacrolix:masterfrom
0rteip:fix/utp-types-go-compat

Conversation

@0rteip
Copy link
Copy Markdown
Contributor

@0rteip 0rteip commented Nov 13, 2025

  • include <stdint.h> and <stdbool.h> for consistent integer/boolean types
  • avoid retypedefs when types already exist
  • normalize macros and spacing
  • keep original behavior on non-C99 platforms\n

…clude <stdint.h> and <stdbool.h> for consistent integer/boolean types\n- avoid retypedefs when types already exist\n- normalize macros and spacing\n- keep original behavior on non-C99 platforms\n
@anacrolix
Copy link
Copy Markdown
Owner

Note that we try to minimise the diff from upstream, although admittedly it has ossified, and clearly done this stuff poorly.

@0rteip
Copy link
Copy Markdown
Contributor Author

0rteip commented Nov 15, 2025

Thanks for the clarification! This was actually my first time working with Go. The project I am working on wasn’t compiling on my side, so I tried a quick fix without noticing the upstream considerations.

@anacrolix
Copy link
Copy Markdown
Owner

I fixed CI on master, will merge as soon as it passes.

@anacrolix
Copy link
Copy Markdown
Owner

I tested it locally and had no issues. No reason to block.

@anacrolix anacrolix merged commit a3eb2d1 into anacrolix:master Nov 20, 2025
3 of 8 checks passed
@0rteip
Copy link
Copy Markdown
Contributor Author

0rteip commented Nov 20, 2025

Great, thank you! 😊

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