Question Details

No question body available.

Tags

c memory-management makefile linker libc

Answers (1)

Accepted Answer Available
Accepted Answer
May 26, 2026 Score: 5 Rep: 235,129 Quality: High Completeness: 50%

This can happen if you have other includes before #define GNUSOURCE.

Make sure this macro appears first before any file is included. For example, this causes an implicit declaration warning for mremap:

#include 
#include 

#define GNUSOURCE #include

While this does not:

#define GNUSOURCE
#include 

#include #include