linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Create.c: fix uclibc build
@ 2024-04-12 16:45 Fabrice Fontaine
  2024-04-15 15:24 ` Mariusz Tkaczyk
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2024-04-12 16:45 UTC (permalink / raw)
  To: linux-raid; +Cc: Jes Sorensen, Mariusz Tkaczyk, Fabrice Fontaine

Define FALLOC_FL_ZERO_RANGE if needed as FALLOC_FL_ZERO_RANGE is only
defined for aarch64 on uclibc-ng resulting in the following or1k build
failure since commit 577fd10486d8d1472a6b559066f344ac30a3a391:

Create.c: In function 'write_zeroes_fork':
Create.c:155:35: error: 'FALLOC_FL_ZERO_RANGE' undeclared (first use in this function)
  155 |                 if (fallocate(fd, FALLOC_FL_ZERO_RANGE | FALLOC_FL_KEEP_SIZE,
      |                                   ^~~~~~~~~~~~~~~~~~~~

Fixes:
 - http://autobuild.buildroot.org/results/0e04bcdb591ca5642053e1f7e31384f06581e989

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 Create.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Create.c b/Create.c
index 4397ff49..d94253b1 100644
--- a/Create.c
+++ b/Create.c
@@ -32,6 +32,10 @@
 #include	<sys/signalfd.h>
 #include	<sys/wait.h>
 
+#ifndef FALLOC_FL_ZERO_RANGE
+#define FALLOC_FL_ZERO_RANGE 16
+#endif
+
 static int round_size_and_verify(unsigned long long *size, int chunk)
 {
 	if (*size == 0)
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Create.c: fix uclibc build
  2024-04-12 16:45 [PATCH] Create.c: fix uclibc build Fabrice Fontaine
@ 2024-04-15 15:24 ` Mariusz Tkaczyk
  0 siblings, 0 replies; 2+ messages in thread
From: Mariusz Tkaczyk @ 2024-04-15 15:24 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: linux-raid, Jes Sorensen

On Fri, 12 Apr 2024 18:45:13 +0200
Fabrice Fontaine <fontaine.fabrice@gmail.com> wrote:

> Define FALLOC_FL_ZERO_RANGE if needed as FALLOC_FL_ZERO_RANGE is only
> defined for aarch64 on uclibc-ng resulting in the following or1k build
> failure since commit 577fd10486d8d1472a6b559066f344ac30a3a391:
> 
> Create.c: In function 'write_zeroes_fork':
> Create.c:155:35: error: 'FALLOC_FL_ZERO_RANGE' undeclared (first use in this
> function) 155 |                 if (fallocate(fd, FALLOC_FL_ZERO_RANGE |
> FALLOC_FL_KEEP_SIZE, |                                   ^~~~~~~~~~~~~~~~~~~~
> 
> Fixes:
>  -
> http://autobuild.buildroot.org/results/0e04bcdb591ca5642053e1f7e31384f06581e989
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Applied! 

Thanks,
Mariusz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-04-15 15:24 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-12 16:45 [PATCH] Create.c: fix uclibc build Fabrice Fontaine
2024-04-15 15:24 ` Mariusz Tkaczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).