qemu-devel
[Top][All Lists]
Advanced

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

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


From: Peter Maydell
Subject: Re: [PATCH v3 1/3] util/osdep: Avoid madvise proto on modern Solaris
Date: Fri, 18 Mar 2022 11:26:05 +0000

On Wed, 16 Mar 2022 at 03:53, Andrew Deason <adeason@sinenomine.net> wrote:
>
> On older Solaris releases (before Solaris 11), we didn't get a
> prototype for madvise, and so util/osdep.c provides its own prototype.
> Some time between the public Solaris 11.4 release and Solaris 11.4.42
> CBE, we started getting an madvise prototype that looks like this:
>
>     extern int madvise(void *, size_t, int);
>
> which conflicts with the prototype in util/osdeps.c. Instead of always
> declaring this prototype, check if we're missing the madvise()
> prototype, and only declare it ourselves if the prototype is missing.
> Move the prototype to include/qemu/osdep.h, the normal place to handle
> platform-specific header quirks.
>
> The 'missing_madvise_proto' meson check contains an obviously wrong
> prototype for madvise. So if that code compiles and links, we must be
> missing the actual prototype for madvise.
>
> Signed-off-by: Andrew Deason <adeason@sinenomine.net>

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM



reply via email to

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