diff --git a/desktop-shell/shell.c b/desktop-shell/shell.c index 5f6bd6d6..9fbac000 100644 --- a/desktop-shell/shell.c +++ b/desktop-shell/shell.c @@ -43,6 +43,10 @@ #define DEFAULT_NUM_WORKSPACES 1 #define DEFAULT_WORKSPACE_CHANGE_ANIMATION_LENGTH 200 +#ifndef static_assert +#define static_assert(cond, msg) +#endif + struct focus_state { struct weston_seat *seat; struct workspace *ws; diff --git a/src/compositor.h b/src/compositor.h index a1613451..6bd637ed 100644 --- a/src/compositor.h +++ b/src/compositor.h @@ -45,10 +45,6 @@ extern "C" { #define ARRAY_LENGTH(a) (sizeof (a) / sizeof (a)[0]) -#ifndef static_assert -#define static_assert(cond, msg) -#endif - #define container_of(ptr, type, member) ({ \ const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \ (type *)( (char *)__mptr - offsetof(type,member) );})