diff options
author | Philippe Mathieu-Daudé <f4bug@amsat.org> | 2022-08-10 00:20:46 +0200 |
---|---|---|
committer | Peter Maydell <peter.maydell@linaro.org> | 2022-08-12 11:33:52 +0100 |
commit | 4311682ea8293f720730f260e8a7601117d79e65 (patch) | |
tree | 71cc9e7ad9fb88a2bf7ab9da68cd0f0d4b3fc3a3 /util/cutils.c | |
parent | e1f045780ba60bc511b5acb168b32a6a41148d73 (diff) | |
download | qemu-4311682ea8293f720730f260e8a7601117d79e65.zip qemu-4311682ea8293f720730f260e8a7601117d79e65.tar.gz qemu-4311682ea8293f720730f260e8a7601117d79e65.tar.bz2 |
cutils: Add missing dyld(3) include on macOS
Commit 06680b15b4 moved qemu_*_exec_dir() to cutils but forgot
to move the macOS dyld(3) include, resulting in the following
error (when building with Homebrew GCC on macOS Monterey 12.4):
[313/1197] Compiling C object libqemuutil.a.p/util_cutils.c.o
FAILED: libqemuutil.a.p/util_cutils.c.o
../../util/cutils.c:1039:13: error: implicit declaration of function '_NSGetExecutablePath' [-Werror=implicit-function-declaration]
1039 | if (_NSGetExecutablePath(fpath, &len) == 0) {
| ^~~~~~~~~~~~~~~~~~~~
../../util/cutils.c:1039:13: error: nested extern declaration of '_NSGetExecutablePath' [-Werror=nested-externs]
Fix by moving the include line to cutils.
Fixes: 06680b15b4 ("include: move qemu_*_exec_dir() to cutils")
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 20220809222046.30812-1-f4bug@amsat.org
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Diffstat (limited to 'util/cutils.c')
-rw-r--r-- | util/cutils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/util/cutils.c b/util/cutils.c index cb43dda..def9c74 100644 --- a/util/cutils.c +++ b/util/cutils.c @@ -39,6 +39,10 @@ #include <kernel/image.h> #endif +#ifdef __APPLE__ +#include <mach-o/dyld.h> +#endif + #ifdef G_OS_WIN32 #include <pathcch.h> #include <wchar.h> |