logo

utils-std

Collection of commonly available Unix tools
commit: c0981071dddab9ab3aee51815f2045e191a8355e
parent f58bfcf97379f01455fe5a951e5a0c6511b998f6
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sun,  5 May 2024 01:50:20 +0200

Add _GNU_SOURCE for copy_file_range

This time its musl and glibc which are too strict.

Diffstat:

Mcmd/install.c4+++-
Mconfigure.d/copy_file_range.c4+++-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/cmd/install.c b/cmd/install.c @@ -2,7 +2,9 @@ // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> // SPDX-License-Identifier: MPL-2.0 -#define _DEFAULT_SOURCE // copy_file_range +// For copy_file_range +#define _GNU_SOURCE // musl, glibc +#define _DEFAULT_SOURCE // FreeBSD #include "../lib/mkdir.h" #include "../lib/mode.h" diff --git a/configure.d/copy_file_range.c b/configure.d/copy_file_range.c @@ -2,7 +2,9 @@ // SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> // SPDX-License-Identifier: MPL-2.0 -#define _DEFAULT_SOURCE // for copy_file_range +// For copy_file_range +#define _GNU_SOURCE // musl, glibc +#define _DEFAULT_SOURCE // FreeBSD #include <stdint.h> // SIZE_MAX #include <sys/types.h>