Skip to content

libnetconf2 CHANGE QNX compatibility#220

Merged
michalvasko merged 2 commits intoCESNET:develfrom
apropp-molex:qnx-compat
Apr 20, 2020
Merged

libnetconf2 CHANGE QNX compatibility#220
michalvasko merged 2 commits intoCESNET:develfrom
apropp-molex:qnx-compat

Conversation

@apropp-molex
Copy link
Copy Markdown
Contributor

fixes #217
Below is a summary of the compatibility issues this solves:

  1. Links against liblogin for QNX only
  2. Checks if crypt.h, shadow.h exists instead of relying on OS checks
  3. Accommodates different function signature for getspnam_r under QNX
  4. Uses getpeereid for QNX only. This is because -D_XOPEN_SOURCE=500 in CMakeLists.txt caused conflict with -D_POSIX_C_SOURCE=200809L and using #define _XOPEN_SOURCE 500 in session_server.c caused a host of issues with pthread stuff. libpthread is removed from CMAKE_REQUIRED_LIBRARIES as it cmake failed to link while looking for getpeereid. libpthread is replaced by libc on QNX.
    Other than those issues, I don't have a BSD/MAC system to test this against, so restricted it to QNX to avoid causing regression issues.

Copy link
Copy Markdown
Member

@michalvasko michalvasko left a comment

Choose a reason for hiding this comment

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

Okay, except for that one detail I think the changes are nice and clean so they can safely be merged.

Comment thread src/session_server.c Outdated
@michalvasko
Copy link
Copy Markdown
Member

Hi,
almost, I will add some final minor improvements myself. Merging.

Regards,
Michal

@michalvasko michalvasko merged commit 4e903c3 into CESNET:devel Apr 20, 2020
@apropp-molex apropp-molex deleted the qnx-compat branch April 20, 2020 13:54
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