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

Fix building on OpenBSD big endian hosts #1520

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

brad0
Copy link
Contributor

@brad0 brad0 commented Mar 2, 2024

There is a swap16() function which conflicts with such a macro
in the endian.h header. uint16_t swap16(uint16_t val16);

@rouault
Copy link
Collaborator

rouault commented Mar 2, 2024

There is a swap16() function which conflicts with such a function
in the endian.h header

if it is a function, then !defined(swap16) will not detect it, unless it is actually a macro?

a more robust fix would be to rename the function in openjpeg as opj_swap16

@brad0
Copy link
Contributor Author

brad0 commented Mar 2, 2024

There is a swap16() function which conflicts with such a function
in the endian.h header

if it is a function, then !defined(swap16) will not detect it, unless it is actually a macro?

a more robust fix would be to rename the function in openjpeg as opj_swap16

Yes, in the header it is a macro.

Ya, I was just going to post the other option was to rename the function in openjpeg, which is what most projects tend to do.

There is a swap16() function which conflicts with such a macro
in the endian.h header.  uint16_t swap16(uint16_t val16);

Do as suggested and rename the function to opj_swap16().
@rouault rouault merged commit 0fe2a2c into uclouvain:master Mar 4, 2024
11 of 12 checks passed
@brad0 brad0 deleted the openbsd_swap16 branch March 4, 2024 21:30
bob-beck pushed a commit to openbsd/ports that referenced this pull request Mar 5, 2024
- use https HOMEPAGE
- bump major
- cf https://github.com/uclouvain/openjpeg/blob/v2.5.2/CHANGELOG.md#v252-2024-02-28
  & https://github.com/uclouvain/openjpeg/blob/v2.5.2/CHANGELOG.md#v251-2024-02-26
for details, including CVE-2021-3575
- drop now unneeded patches, last one remaining upstreamed in
  uclouvain/openjpeg#1520
- similar diff sent by brad

tested in a bulk by tb@
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