Commit 6dff498e authored by Daniel Stone's avatar Daniel Stone

shell-helper: Include container_of definition

This used to come with Weston, but no more.
Signed-off-by: default avatarDaniel Stone <daniels@collabora.com>
parent f97bf01d
......@@ -26,6 +26,12 @@
#include "shell-helper-server-protocol.h"
#ifndef container_of
#define container_of(ptr, type, member) ({ \
const __typeof__( ((type *)0)->member ) *__mptr = (ptr); \
(type *)( (char *)__mptr - offsetof(type,member) );})
#endif
struct shell_helper {
struct weston_compositor *compositor;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment