qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Hanna Reitz <hreitz@redhat.com>
To: "Philippe Mathieu-Daudé" <f4bug@amsat.org>, qemu-devel@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	Peter Maydell <peter.maydell@linaro.org>,
	qemu-block@nongnu.org, John Arbuckle <programmingkidx@gmail.com>,
	Roman Bolshakov <r.bolshakov@yadro.com>,
	Joelle van Dyne <j@getutm.app>
Subject: Re: [RFC PATCH] block/file-posix: Remove a deprecation warning on macOS 12
Date: Fri, 14 Jan 2022 15:27:49 +0100	[thread overview]
Message-ID: <a6da24a0-9ece-f0a8-9f07-8f5c946529c0@redhat.com> (raw)
In-Reply-To: <9f852ddf-810b-c008-1887-52519358049a@amsat.org>

On 14.01.22 15:15, Philippe Mathieu-Daudé wrote:
> On 14/1/22 15:09, Hanna Reitz wrote:
>> On 06.01.22 00:56, Philippe Mathieu-Daudé wrote:
>>> When building on macOS 12 we get:
>>>
>>>    ../block/file-posix.c:3335:18: warning: 'IOMasterPort' is 
>>> deprecated: first deprecated in macOS 12.0 [-Wdeprecated-declarations]
>>>        kernResult = IOMasterPort( MACH_PORT_NULL, &masterPort );
>>>                     ^~~~~~~~~~~~
>>>                     IOMainPort
>>>
>>> Use IOMainPort (define it to IOMasterPort on macOS < 12),
>>> and replace 'master' by 'main' in a variable name.
>>>
>>> Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
>>> ---
>>>   block/file-posix.c | 13 +++++++++----
>>>   1 file changed, 9 insertions(+), 4 deletions(-)
>>
>> I hope the [RFC] tag isn’t directed at me.
>>
>> Still, I can give my comment, of course.
>>
>>> diff --git a/block/file-posix.c b/block/file-posix.c
>>> index b283093e5b..0dcfce1856 100644
>>> --- a/block/file-posix.c
>>> +++ b/block/file-posix.c
>>> @@ -3324,17 +3324,22 @@ BlockDriver bdrv_file = {
>>>   #if defined(__APPLE__) && defined(__MACH__)
>>>   static kern_return_t GetBSDPath(io_iterator_t mediaIterator, char 
>>> *bsdPath,
>>>                                   CFIndex maxPathSize, int flags);
>>> +
>>> +#if !defined(MAC_OS_VERSION_12_0)
>>
>> So AFAIU from my quick rather fruit-less googling, this macro is 
>> defined (to some version-defining integer) on every macOS version 
>> starting from 12.0?  (Just confirming because the name could also 
>> mean it’d be defined only on 12.0.)
>
> Thanks, I posted up to v3 and macOS users helped me, I will post a v4 
> soon.
>
> v3: 
> https://lore.kernel.org/qemu-devel/20220110131001.614319-1-f4bug@amsat.org/

I see.  The MAC_OS_X_VERSION_M{IN,AX}_REQUIRED thing was exactly what I 
didn’t really understand from said googling, but the important thing is 
that you do.  (Something to do with what runtime is actually in use 
rather than what the system can provide?  Well, I’ll just stop asking.)  O:)

Hanna



      reply	other threads:[~2022-01-14 15:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-05 23:56 [RFC PATCH] block/file-posix: Remove a deprecation warning on macOS 12 Philippe Mathieu-Daudé
2022-01-14 14:09 ` Hanna Reitz
2022-01-14 14:15   ` Philippe Mathieu-Daudé via
2022-01-14 14:27     ` Hanna Reitz [this message]

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=a6da24a0-9ece-f0a8-9f07-8f5c946529c0@redhat.com \
    --to=hreitz@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=j@getutm.app \
    --cc=kwolf@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=r.bolshakov@yadro.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;
as well as URLs for NNTP newsgroup(s).