From: Michael Forney <mforney@mforney.org>
To: mblaze@googlegroups.com
Subject: [PATCH] mlist: use fixed-width integer types for struct linux_dirent64 d_ino and d_off
Date: Wed, 7 Dec 2022 13:11:58 -0800 [thread overview]
Message-ID: <85c82c7c2dd07febc84e0958244c7eb48e1a83de.1670448134.git.mforney@mforney.org> (raw)
ino64_t and off64_t are non-standard types and musl will no longer
expose them without __LARGEFILE64_SOURCE in the next release.
Internally, the kernel uses u64 and s64 for these fields, so replace
them with uint64_t and int64_t respectively.
---
mlist.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/mlist.c b/mlist.c
index 5debf99..20061d9 100644
--- a/mlist.c
+++ b/mlist.c
@@ -111,8 +111,8 @@ list(char *prefix, char *file)
#include <sys/syscall.h>
struct linux_dirent64 {
- ino64_t d_ino; /* 64-bit inode number */
- off64_t d_off; /* 64-bit offset to next structure */
+ uint64_t d_ino; /* 64-bit inode number */
+ int64_t d_off; /* 64-bit offset to next structure */
unsigned short d_reclen; /* Size of this dirent */
unsigned char d_type; /* File type */
char d_name[]; /* Filename (null-terminated) */
--
2.37.3
--
You received this message because you are subscribed to the Google Groups "mblaze" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mblaze+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mblaze/85c82c7c2dd07febc84e0958244c7eb48e1a83de.1670448134.git.mforney%40mforney.org.
reply other threads:[~2022-12-07 21:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=85c82c7c2dd07febc84e0958244c7eb48e1a83de.1670448134.git.mforney@mforney.org \
--to=mforney@mforney.org \
--cc=mblaze@googlegroups.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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mblaze/
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).