qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 1/3] util/osdep: Avoid madvise proto on modern Solaris


From: Peter Maydell
Subject: Re: [PATCH v2 1/3] util/osdep: Avoid madvise proto on modern Solaris
Date: Tue, 15 Mar 2022 20:28:22 +0000

On Tue, 15 Mar 2022 at 19:16, Andrew Deason <adeason@sinenomine.net> wrote:
>
> On Tue, 15 Mar 2022 18:33:33 +0000
> Peter Maydell <peter.maydell@linaro.org> wrote:
> > Can you put the prototype in include/qemu/osdep.h, please?
> > (Exact location not very important as long as it's inside
> > the extern-C block, but I suggest just under the bit where we
> > define SIGIO for __HAIKU__.)
>
> Okay, but this will cause callers that call madvise() directly to
> "work", even though they're not going through the qemu_madvise wrapper.
> There's one area in cross-platform code you noted before, in
> softmmu/physmem.c, and that does cause the same build error if the
> prototype is missing. (I'm going to add another commit to make that use
> the wrapper in the next patchset.)
>
> I assume that's not a concern unless I hear otherwise; just pointing it
> out.

Yeah, that's fine. The idea is that osdep.h is where we fix up this
kind of odd system-header bug, and we do it for everywhere, because
otherwise it's too easy to forget to put in the "make this work
on the oddball platform" code where it's needed.

If you add the patch to change physmem.c, please cc: the author
of the commit that added it (commit cdfa56c551bb) -- it looks
a bit complicated so it's possible it is intentional.

-- PMM



reply via email to

[Prev in Thread] Current Thread [Next in Thread]