commit: 4a4e526bd4c551b145f564292902446bb73a4c76
parent 2bb392e331805cecb5c87df87c2c8c49b1aeea3b
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:
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>