diff --git a/clients/window.h b/clients/window.h index 4427ab5a..4ae60889 100644 --- a/clients/window.h +++ b/clients/window.h @@ -28,7 +28,10 @@ #include #include "../shared/config-parser.h" #include "../shared/zalloc.h" + +#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM #include "subsurface-client-protocol.h" +#endif #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0]) diff --git a/src/compositor.c b/src/compositor.c index 36b54b5b..9c7ae1aa 100644 --- a/src/compositor.c +++ b/src/compositor.c @@ -53,11 +53,14 @@ #endif #include "compositor.h" -#include "subsurface-server-protocol.h" #include "../shared/os-compatibility.h" #include "git-version.h" #include "version.h" +#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM +#include "subsurface-server-protocol.h" +#endif + static struct wl_list child_process_list; static struct weston_compositor *segv_compositor; diff --git a/tests/subsurface-test.c b/tests/subsurface-test.c index 98e00fea..99e9d6d0 100644 --- a/tests/subsurface-test.c +++ b/tests/subsurface-test.c @@ -23,9 +23,12 @@ #include #include "weston-test-client-helper.h" -#include "subsurface-client-protocol.h" #include +#ifndef WL_SUBCOMPOSITOR_ERROR_ENUM +#include "subsurface-client-protocol.h" +#endif + #define NUM_SUBSURFACES 3 struct compound_surface {