qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Philippe Mathieu-Daudé via" <qemu-devel@nongnu.org>
To: qemu-devel@nongnu.org
Cc: "Roman Bolshakov" <r.bolshakov@yadro.com>,
	"Peter Maydell" <peter.maydell@linaro.org>,
	"Christian Schoenebeck" <qemu_oss@crudebyte.com>,
	"Akihiko Odaki" <akihiko.odaki@gmail.com>,
	"Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: [PATCH v2 7/8] audio: Rename coreaudio extension to use Objective-C compiler
Date: Tue, 15 Feb 2022 18:01:05 +0100	[thread overview]
Message-ID: <20220215170106.95848-8-f4bug@amsat.org> (raw)
In-Reply-To: <20220215170106.95848-1-f4bug@amsat.org>

The coreaudio library includes Objective-C declarations (using the
caret '^' symbol to declare block references [*]). When building
with a C compiler we get:

  [175/839] Compiling C object libcommon.fa.p/audio_coreaudio.c.o
    In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/CoreAudio.h:18,
                     from ../../audio/coreaudio.c:26:
    /Library/Developer/CommandLineTools/SDKs/MacOSX12.sdk/System/Library/Frameworks/CoreAudio.framework/Headers/AudioHardware.h:162:2: error: expected identifier or '(' before '^' token
      162 | (^AudioObjectPropertyListenerBlock)(    UInt32                              inNumberAddresses,
          |  ^
    FAILED: libcommon.fa.p/audio_coreaudio.c.o

Rename the file to use the Objective-C default extension (.m) so
meson calls the correct compiler.

[*] https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/WorkingwithBlocks/WorkingwithBlocks.html

Reviewed-by: Christian Schoenebeck <qemu_oss@crudebyte.com>
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
---
 audio/{coreaudio.c => coreaudio.m} | 0
 audio/meson.build                  | 2 +-
 2 files changed, 1 insertion(+), 1 deletion(-)
 rename audio/{coreaudio.c => coreaudio.m} (100%)

diff --git a/audio/coreaudio.c b/audio/coreaudio.m
similarity index 100%
rename from audio/coreaudio.c
rename to audio/coreaudio.m
diff --git a/audio/meson.build b/audio/meson.build
index d9b295514f..94dab16891 100644
--- a/audio/meson.build
+++ b/audio/meson.build
@@ -7,7 +7,7 @@ softmmu_ss.add(files(
   'wavcapture.c',
 ))
 
-softmmu_ss.add(when: coreaudio, if_true: files('coreaudio.c'))
+softmmu_ss.add(when: coreaudio, if_true: files('coreaudio.m'))
 softmmu_ss.add(when: dsound, if_true: files('dsoundaudio.c', 'audio_win_int.c'))
 
 audio_modules = {}
-- 
2.34.1



  parent reply	other threads:[~2022-02-15 17:25 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-15 17:00 [PATCH v2 0/8] buildsys: More fixes to use GCC on macOS Philippe Mathieu-Daudé via
2022-02-15 17:00 ` [PATCH v2 1/8] osdep: Avoid using Clang-specific __builtin_available() Philippe Mathieu-Daudé via
2022-02-15 17:01 ` [PATCH v2 2/8] osdep: Ignore 'unguarded-availability-new' warnings on macOS Catalina Philippe Mathieu-Daudé via
2022-02-16  2:36   ` Akihiko Odaki
2022-02-15 17:01 ` [PATCH v2 3/8] meson: Resolve the entitlement.sh script once for good Philippe Mathieu-Daudé via
2022-02-15 17:01 ` [PATCH v2 4/8] configure: Disable out-of-line atomic operations on Aarch64 Philippe Mathieu-Daudé via
2022-02-16  2:41   ` Akihiko Odaki
2022-02-16 10:19   ` Richard Henderson
2022-02-16 15:08     ` Philippe Mathieu-Daudé via
2022-02-16 16:42       ` Akihiko Odaki
2022-02-16 17:18         ` Philippe Mathieu-Daudé via
2022-02-16 17:19           ` Peter Maydell
2022-02-18  1:46           ` Richard Henderson
2022-02-18 15:36             ` Paolo Bonzini
2022-03-06 22:21               ` Philippe Mathieu-Daudé
2022-02-18 15:42   ` Paolo Bonzini
2022-02-15 17:01 ` [PATCH v2 5/8] meson: Log QEMU_CXXFLAGS content in summary Philippe Mathieu-Daudé via
2022-02-15 17:01 ` [PATCH v2 6/8] configure: Pass filtered QEMU_OBJCFLAGS to meson Philippe Mathieu-Daudé via
2022-02-18 15:44   ` Paolo Bonzini
2022-02-15 17:01 ` Philippe Mathieu-Daudé via [this message]
2022-02-15 17:01 ` [PATCH v2 8/8] ui/cocoa: Constify qkeycode translation arrays Philippe Mathieu-Daudé via

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=20220215170106.95848-8-f4bug@amsat.org \
    --to=qemu-devel@nongnu.org \
    --cc=akihiko.odaki@gmail.com \
    --cc=f4bug@amsat.org \
    --cc=peter.maydell@linaro.org \
    --cc=qemu_oss@crudebyte.com \
    --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).