authorgravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2024-06-15 22:20:20+02:00
committergravatar for mail@isaacfreund.comIsaac Freund <mail@isaacfreund.com> 2024-06-17 23:26:53+02:00
log687a756bf9b443ae53aa6dc3ee8f4a1550a09597
tree2bc99d8c9c5be770e39d5ac6229f372691338ccf
parent254a3ba9d963bd031d1e536d0da1ad0621121db2
signaturelock-open Commit is signed but in an unrecognized format.

std: make all dirent structs extern

Using structs with unspecified layout on the ABI boundry can't end well.

2 files changed, 3 insertions(+), 3 deletions(-)

lib/std/c/emscripten.zig+1-1
......@@ -171,7 +171,7 @@ pub const RTLD = struct {
171171 pub const LOCAL = 0;
172172};
173173
174pub const dirent = struct {
174pub const dirent = extern struct {
175175 ino: c_uint,
176176 off: c_uint,
177177 reclen: c_ushort,
lib/std/c/linux.zig+2-2
......@@ -330,14 +330,14 @@ pub const RTLD = struct {
330330 pub const LOCAL = 0;
331331};
332332
333pub const dirent = struct {
333pub const dirent = extern struct {
334334 ino: c_uint,
335335 off: c_uint,
336336 reclen: c_ushort,
337337 type: u8,
338338 name: [256]u8,
339339};
340pub const dirent64 = struct {
340pub const dirent64 = extern struct {
341341 ino: c_ulong,
342342 off: c_ulong,
343343 reclen: c_ushort,