Skip to content

POSIX functions not defined if using -std=cXX #235

Description

@aalmkainzi

Hi.
If I compile using -std=cXX for example -std=c11, nob fails to compile because it's using some POSIX extentions (e.g. clock_gettime, CLOCK_MONOTONIC, nanosleep, etc.).

The fix is to define _GNU_SOURCE before including headers:

#ifdef __linux__
    #define _GNU_SOURCE
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions