From: Peter Maydell <peter.maydell@linaro.org>
To: Michael Tokarev <mjt@tls.msk.ru>
Cc: "Alex Bennée" <alex.bennee@linaro.org>,
qemu-devel@nongnu.org, "Kyle Evans" <kevans@freebsd.org>,
"Pierrick Bouvier" <pierrick.bouvier@linaro.org>,
"Warner Losh" <imp@bsdimp.com>,
qemu-arm@nongnu.org, "Thomas Huth" <th.huth+qemu@posteo.eu>,
"Peter Xu" <peterx@redhat.com>, "Fabiano Rosas" <farosas@suse.de>,
"Brad Smith" <brad@comstyle.com>,
"Thomas Huth" <thuth@redhat.com>,
"Daniel P. Berrangé" <berrange@redhat.com>,
"Philippe Mathieu-Daudé" <philmd@linaro.org>,
"Paolo Bonzini" <pbonzini@redhat.com>,
"Matheus Tavares Bernardino"
<matheus.bernardino@oss.qualcomm.com>,
"Brian Cain" <brian.cain@oss.qualcomm.com>
Subject: Re: [PATCH v3 2/8] tests/tcg/multiarch/linux-test: use portable alternative for dirent64
Date: Tue, 24 Mar 2026 13:27:18 +0000 [thread overview]
Message-ID: <CAFEAcA--8-mRVdvgOzX+WEg3gXOH8Om3L8cebDRSP31G8-T=yQ@mail.gmail.com> (raw)
In-Reply-To: <f2f9f07a-4c92-4856-bcf6-7d2e0a5d43f1@tls.msk.ru>
On Tue, 24 Mar 2026 at 13:15, Michael Tokarev <mjt@tls.msk.ru> wrote:
>
> On 20.03.2026 18:51, Alex Bennée wrote:
> > From: Matheus Tavares Bernardino <matheus.bernardino@oss.qualcomm.com>
> >
> > dirent64 and readdir64 are glibc-specific and not portable to other
> > C libraries such as musl. Define _FILE_OFFSET_BITS=64 instead, which
> > portably instructs all libc implementations to use 64-bit file offsets,
> > making readdir() and struct dirent equivalent to their 64-bit variants.
>
>
> > --- a/tests/tcg/multiarch/linux/linux-test.c
> > +++ b/tests/tcg/multiarch/linux/linux-test.c
> > @@ -16,6 +16,7 @@
> > * You should have received a copy of the GNU General Public License
> > * along with this program; if not, see <http://www.gnu.org/licenses/>.
> > */
> > +#define _FILE_OFFSET_BITS 64
>
> Afiacs, qemu has always been built with file_offset_bits=64, one way
> or another:
>
> meson.build:
> '-D_GNU_SOURCE', '-D_FILE_OFFSET_BITS=64', '-D_LARGEFILE_SOURCE',
Those control the compiler flags for QEMU itself. This is
a standalone test program built for the guest, and it isn't
built directly by meson.
> Now, with only 64bit host support, defining _FILE_OFFSET_BITS to 64
> makes no difference, since it is already 64 by default.
We still support 32-bit guests, though, and this is being built
for the guest architecture.
thanks
-- PMM
next prev parent reply other threads:[~2026-03-24 13:28 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-20 15:50 [PATCH v3 0/8] testing/next: gdb-multiarch, check-tcg, docker, vbsa tests (pre-PR) Alex Bennée
2026-03-20 15:51 ` [PATCH v3 1/8] tests/tcg: allow filtering of TCG tests Alex Bennée
2026-03-20 15:51 ` [PATCH v3 2/8] tests/tcg/multiarch/linux-test: use portable alternative for dirent64 Alex Bennée
2026-03-24 13:15 ` Michael Tokarev
2026-03-24 13:27 ` Peter Maydell [this message]
2026-03-20 15:51 ` [PATCH v3 3/8] tests/functional: allow tests to define decompression target Alex Bennée
2026-03-20 15:51 ` [PATCH v3 4/8] tests/functional: add VBSA linux tests Alex Bennée
2026-03-20 15:51 ` [PATCH v3 5/8] tests/lcitool: Remove python3-sqlite3 from the list of needed packages Alex Bennée
2026-03-20 15:51 ` [PATCH v3 6/8] tests/lcitool: Update openSUSE to version 16 Alex Bennée
2026-03-20 15:51 ` [PATCH v3 7/8] tests/docker: Update the opensuse-leap container file " Alex Bennée
2026-03-20 15:51 ` [PATCH v3 8/8] tests: Replace ncat with socat in migration test and drop ncat from containers Alex Bennée
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='CAFEAcA--8-mRVdvgOzX+WEg3gXOH8Om3L8cebDRSP31G8-T=yQ@mail.gmail.com' \
--to=peter.maydell@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=berrange@redhat.com \
--cc=brad@comstyle.com \
--cc=brian.cain@oss.qualcomm.com \
--cc=farosas@suse.de \
--cc=imp@bsdimp.com \
--cc=kevans@freebsd.org \
--cc=matheus.bernardino@oss.qualcomm.com \
--cc=mjt@tls.msk.ru \
--cc=pbonzini@redhat.com \
--cc=peterx@redhat.com \
--cc=philmd@linaro.org \
--cc=pierrick.bouvier@linaro.org \
--cc=qemu-arm@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=th.huth+qemu@posteo.eu \
--cc=thuth@redhat.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