Skip to content

_GNU_SOURCE is set inconsistently between configure and build #158

@alyssais

Description

@alyssais

Since b40c560 ("configure_func.sh: Add _GNU_SOURCE define and function signatures"), _GNU_SOURCE will be defined when checking whether a function is available, but then won't be set during the actual build,resulting in the build trying to use a function that isn't visible to it.

For example, musl only defines memrchr with _GNU_SOURCE. The configure check for this function sets _GNU_SOURCE, and will pass, but then during compileration calls to memrchr will result in errors because _GNU_SOURCE is not passed to the compiler then.

To fix this, _GNU_SOURCE should always be part of cflags to match the environment used by the configure checks. On platforms where _GNU_SOURCE isn't used, this should be a no-op.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions