From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
To: linux-raid@vger.kernel.org
Cc: Jes Sorensen <jes@trained-monkey.org>,
Mariusz Tkaczyk <mariusz.tkaczyk@linux.intel.com>,
Fabrice Fontaine <fontaine.fabrice@gmail.com>
Subject: [PATCH] Create.c: fix uclibc build
Date: Fri, 12 Apr 2024 18:45:13 +0200 [thread overview]
Message-ID: <20240412164513.6829-1-fontaine.fabrice@gmail.com> (raw)
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
next reply other threads:[~2024-04-12 16:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-04-12 16:45 Fabrice Fontaine [this message]
2024-04-15 15:24 ` [PATCH] Create.c: fix uclibc build Mariusz Tkaczyk
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240412164513.6829-1-fontaine.fabrice@gmail.com \
--to=fontaine.fabrice@gmail.com \
--cc=jes@trained-monkey.org \
--cc=linux-raid@vger.kernel.org \
--cc=mariusz.tkaczyk@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 read-only IMAP folder(s) and NNTP newsgroup(s).