From afbcf20f24729e9bf2e87a72efadeb48ddcdd6f7 Mon Sep 17 00:00:00 2001 From: Christian Heimes Date: Tue, 19 Oct 2021 15:07:52 +0200 Subject: [PATCH] Define _DEFAULT_SOURCE for syscall and realpath Define ``_DEFAULT_SOURCE`` in ``random.c`` and ``alloc.c``. The macro is required for ``syscall()`` and ``realpath()``. Other files like ``os.c`` already define the macro. Signed-off-by: Christian Heimes --- src/alloc.c | 4 ++++ src/random.c | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/alloc.c b/src/alloc.c index 8acff783..5e45e76f 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -4,6 +4,10 @@ This is free software; you can redistribute it and/or modify it under the terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE // for realpath() on Linux +#endif + #include "mimalloc.h" #include "mimalloc-internal.h" #include "mimalloc-atomic.h" diff --git a/src/random.c b/src/random.c index 255bede4..0e2331bd 100644 --- a/src/random.c +++ b/src/random.c @@ -4,6 +4,10 @@ This is free software; you can redistribute it and/or modify it under the terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ +#ifndef _DEFAULT_SOURCE +#define _DEFAULT_SOURCE // for syscall() on Linux +#endif + #include "mimalloc.h" #include "mimalloc-internal.h"