From: Khem Raj <raj.khem@gmail.com>
To: linux-xfs@vger.kernel.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH] include libgen.h for basename API prototype
Date: Mon, 25 Mar 2024 10:09:41 -0700 [thread overview]
Message-ID: <20240325170941.3279129-1-raj.khem@gmail.com> (raw)
basename prototype has been removed from string.h from latest musl [1]
compilers e.g. clang-18 flags the absense of prototype as error. therefore
include libgen.h for providing it.
[1] https://git.musl-libc.org/cgit/musl/commit/?id=725e17ed6dff4d0cd22487bb64470881e86a92e7
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
common/main.c | 1 +
invutil/invidx.c | 1 +
2 files changed, 2 insertions(+)
diff --git a/common/main.c b/common/main.c
index 1db07d4..ca3b7d4 100644
--- a/common/main.c
+++ b/common/main.c
@@ -16,6 +16,7 @@
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <libgen.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
diff --git a/invutil/invidx.c b/invutil/invidx.c
index 5874e8d..c4e2e21 100644
--- a/invutil/invidx.c
+++ b/invutil/invidx.c
@@ -19,6 +19,7 @@
#include <xfs/xfs.h>
#include <xfs/jdm.h>
+#include <libgen.h>
#include <stdio.h>
#include <fcntl.h>
#include <unistd.h>
--
2.44.0
next reply other threads:[~2024-03-25 17:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-25 17:09 Khem Raj [this message]
2024-03-26 0:15 ` [PATCH] include libgen.h for basename API prototype Darrick J. Wong
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=20240325170941.3279129-1-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=linux-xfs@vger.kernel.org \
/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).