This is a prep patch. The next patch will cause macro redefinition warnings if we don't have this patch. Signed-off-by: Ammar Faizi <ammarfaizi2@xxxxxxxxxxx> --- src/queue.c | 2 ++ src/register.c | 2 ++ src/setup.c | 2 ++ src/syscall.c | 2 ++ 4 files changed, 8 insertions(+) diff --git a/src/queue.c b/src/queue.c index ce0ecf6..800ae0c 100644 --- a/src/queue.c +++ b/src/queue.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: MIT */ +#ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L +#endif #include "lib.h" #include "syscall.h" diff --git a/src/register.c b/src/register.c index 993c450..f19a720 100644 --- a/src/register.c +++ b/src/register.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: MIT */ +#ifndef _POSIX_C_SOURCE #define _POSIX_C_SOURCE 200112L +#endif #include "lib.h" #include "syscall.h" diff --git a/src/setup.c b/src/setup.c index d2adc7f..e28560d 100644 --- a/src/setup.c +++ b/src/setup.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: MIT */ +#ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE +#endif #include "lib.h" #include "syscall.h" diff --git a/src/syscall.c b/src/syscall.c index 362f1f5..b10f8b0 100644 --- a/src/syscall.c +++ b/src/syscall.c @@ -1,5 +1,7 @@ /* SPDX-License-Identifier: MIT */ +#ifndef _DEFAULT_SOURCE #define _DEFAULT_SOURCE +#endif /* * Functions in this file require libc, only build them when we use libc. -- Ammar Faizi