From d962e6a9a584e21623ee1cb2439c74d166aceaa0 Mon Sep 17 00:00:00 2001 From: Isaac Freund Date: Tue, 28 Apr 2020 19:16:01 +0200 Subject: Workaround global anonymous field name counter Fixes https://github.com/ifreund/river/issues/17 --- src/c.zig | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/c.zig') diff --git a/src/c.zig b/src/c.zig index a551d8e..72bbc04 100644 --- a/src/c.zig +++ b/src/c.zig @@ -30,3 +30,9 @@ pub usingnamespace @cImport({ // that can be automatically imported @cInclude("include/bindings.h"); }); + +// These are needed because zig currently names translated anonymous unions +// with a global counter, which makes code unportable. +// See https://github.com/ifreund/river/issues/17 +pub const wlr_xdg_surface_union = @typeInfo(wlr_xdg_surface).Struct.fields[5].name; +pub const wlr_input_device_union = @typeInfo(wlr_input_device).Struct.fields[8].name; -- cgit v1.2.3