Skip to content

Conversation

@Abdelaziz177
Copy link

Problem

When building on QNX LP64 (e.g., Neutrino 8 x86_64), the 64-suffixed APIs are often not declared because the non-suffixed ones already use 64-bit off_t. Calling ::mmap64 / ::mem_offset64 unconditionally produces errors like:

'::mmap64' has not been declared

'::mem_offset64' has not been declared

What this PR does

Adds the missing system headers <sys/mman.h> and <sys/types.h> at the top of mman_impl.cpp.

Uses feature checks to select the correct calls:

On QNX && LP64, mmap64() delegates to ::mmap(...) (already 64-bit).

On QNX && LP64, mem_offset64() delegates to ::mem_offset(...) (already 64-bit).

On all other platforms, behavior is unchanged (still calls the 64-suffixed versions).

Why this is correct

On LP64 systems, off_t is 64-bit, so the non-suffixed calls already use wide offsets.

QNX headers may not even declare the “64” symbols on LP64 because they are redundant.

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.

1 participant