Skip to content

Avoid dependency on <linux/mman.h> #8

@solardiz

Description

@solardiz

Building yescrypt on Alpine Linux requires apk add linux-headers for our #include <linux/mman.h> /* for MAP_HUGE_2MB */. That's rather unfortunate. It got me thinking of defining MAP_HUGE_2MB ourselves, but then we'd try to use it even on old systems that lack it, so would fail at runtime on RHEL6. Which also reminds me that the same failure would happen if a binary is moved from a newer to an older Linux system (if it's otherwise compatible enough to run).

Maybe the right way is to try (the numeric value of) MAP_HUGE_2MB and fallback to not using it at runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions