Skip to content
Snippets Groups Projects
Commit 021e3fa3 authored by Daniel P. Berrangé's avatar Daniel P. Berrangé Committed by Alex Bennée
Browse files

ui: avoid warnings about directdb on Alpine / musl libc


On Alpine, SDL is built with directfb support and this triggers warnings
during QEMU build

In file included from /usr/include/directfb/direct/thread.h:38,
                 from /usr/include/directfb/direct/debug.h:43,
                 from /usr/include/directfb/direct/interface.h:36,
                 from /usr/include/directfb/directfb.h:49,
                 from /usr/include/SDL2/SDL_syswm.h:80,
                 from /builds/berrange/qemu/include/ui/sdl2.h:8,
                 from ../ui/sdl2-gl.c:31:
/usr/include/directfb/direct/os/waitqueue.h:41:25: error: redundant redeclaration of 'direct_waitqueue_init' [-Werror=redundant-decls]
   41 | DirectResult DIRECT_API direct_waitqueue_init        ( DirectWaitQueue *queue );
      |                         ^~~~~~~~~~~~~~~~~~~~~

Reviewed-by: default avatarPhilippe Mathieu-Daudé <philmd@redhat.com>
Signed-off-by: default avatarDaniel P. Berrangé <berrange@redhat.com>
Signed-off-by: default avatarAlex Bennée <alex.bennee@linaro.org>
Message-Id: <20211215141949.3512719-5-berrange@redhat.com>
Message-Id: <20220105135009.1584676-5-alex.bennee@linaro.org>
parent a41b4fdc
No related branches found
No related tags found
No related merge requests found
......@@ -5,7 +5,18 @@
#undef WIN32_LEAN_AND_MEAN
#include <SDL.h>
/* with Alpine / muslc SDL headers pull in directfb headers
* which in turn trigger warning about redundant decls for
* direct_waitqueue_deinit.
*/
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wredundant-decls"
#include <SDL_syswm.h>
#pragma GCC diagnostic pop
#ifdef CONFIG_SDL_IMAGE
# include <SDL_image.h>
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment