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

Compilation not working for QNX #8487

Closed
pablorcum opened this issue Apr 14, 2021 · 2 comments
Closed

Compilation not working for QNX #8487

pablorcum opened this issue Apr 14, 2021 · 2 comments

Comments

@pablorcum
Copy link

What version of protobuf and what language are you using?
Version: master
Language: C++

What operating system (Linux, Windows, ...) and version?
Host: Windows 10
Cross-compiling for QNX v7.1

What runtime / compiler are you using (e.g., python version or gcc version)
QNX SDP 7.1 - QCC v8.3

What did you do?
Steps to reproduce the behavior:

  1. Build CMake project for QNX

What did you expect to see
Compilation working. It stopped working after #8106 that removed sys/param.h.

What did you see instead?
Source code does not compile due to missing endian.h.

Anything else we should know about your project / environment
It works by replacing
#include <endian.h> // __BYTE_ORDER
with
#include <sys/platform.h> // __BYTE_ORDER
Actually, sys/param.h is not required and sys/platform.h is enough to enable compilation in files src\google\protobuf\stubs\port.h and src\google\protobuf\io\coded_stream.h.

@TeBoring
Copy link
Contributor

Could you add

#elif defined(__QNX__)
#include <sys/platform.h> // __BYTE_ORDER

in files changed in https://github.com/protocolbuffers/protobuf/pull/8106/files

@pablorcum
Copy link
Author

Fixed by #8637

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

No branches or pull requests

2 participants