Linux-Modules Archive on
 help / Atom feed
From: Heiko Becker <>
Cc: Heiko Becker <>
Subject: [PATCH] Only use _FILE_OFFSET_BITS with __GLIBC__
Date: Thu,  7 Mar 2019 21:26:06 +0100
Message-ID: <> (raw)

It's a glibc specific macro. With the musl libc {,l}stat64 are just
a macro defined for compatibility and off_t is always 64bit. The
former's expansion causes a build error though:
"...testsuite/path.c:191:21: error: redefinition of 'stat'".
 testsuite/path.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/testsuite/path.c b/testsuite/path.c
index fa5fceb..74db898 100644
--- a/testsuite/path.c
+++ b/testsuite/path.c
@@ -187,7 +187,7 @@ WRAP_2ARGS(int, -1, mkdir, mode_t);
 WRAP_2ARGS(int, -1, access, int);
 WRAP_2ARGS(int, -1, stat, struct stat*);
 WRAP_2ARGS(int, -1, lstat, struct stat*);
+#if defined(__GLIBC__) && !defined(_FILE_OFFSET_BITS)
 WRAP_2ARGS(int, -1, stat64, struct stat64*);
 WRAP_2ARGS(int, -1, lstat64, struct stat64*);
@@ -198,7 +198,7 @@ WRAP_OPEN();
 #ifdef HAVE___XSTAT
+#if defined(__GLIBC__) && !defined(_FILE_OFFSET_BITS)

             reply index

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-07 20:26 Heiko Becker [this message]
2019-03-08 17:16 ` Lucas De Marchi

Reply instructions:

You may reply publically 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:

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \ \ \ \

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Linux-Modules Archive on

Archives are clonable:
	git clone --mirror linux-modules/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-modules linux-modules/ \
	public-inbox-index linux-modules

Newsgroup available over NNTP:

AGPL code for this site: git clone public-inbox