aboutsummaryrefslogtreecommitdiff
path: root/src/c.zig
diff options
context:
space:
mode:
authorIsaac Freund <ifreund@ifreund.xyz>2020-04-28 19:16:01 +0200
committerIsaac Freund <ifreund@ifreund.xyz>2020-04-28 19:16:01 +0200
commitd962e6a9a584e21623ee1cb2439c74d166aceaa0 (patch)
tree97b8c8b52fc1221de15c99459c43346fb5b39744 /src/c.zig
parent7988a2e9348ddbe60a24cbead76ae7c662f3c73a (diff)
downloadriver-d962e6a9a584e21623ee1cb2439c74d166aceaa0.tar.gz
river-d962e6a9a584e21623ee1cb2439c74d166aceaa0.tar.xz
Workaround global anonymous field name counter
Fixes https://github.com/ifreund/river/issues/17
Diffstat (limited to 'src/c.zig')
-rw-r--r--src/c.zig6
1 files changed, 6 insertions, 0 deletions
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;