digitalmars.D.learn - msghdr and cmsghdr mismatch for alpine musl
- d007 (5/5) Nov 24 2023 `import core.sys.posix.sys.socket : msghdr, cmsghdr, iovec;`
- Steven Schveighoffer (3/8) Nov 26 2023 Yes. Mismatch of types is a really bad error for c interaction.
`import core.sys.posix.sys.socket : msghdr, cmsghdr, iovec;` `msg_iovlen`, `msg_controllen`, `cmsg_len` is ulong for x86-64 in druntime. in alpine musl, they are int, socklen_t(uint), socklen_t(uint). Is this mismatch can cause problems is I use related api ?
Nov 24 2023
On Saturday, 25 November 2023 at 05:04:57 UTC, d007 wrote:`import core.sys.posix.sys.socket : msghdr, cmsghdr, iovec;` `msg_iovlen`, `msg_controllen`, `cmsg_len` is ulong for x86-64 in druntime. in alpine musl, they are int, socklen_t(uint), socklen_t(uint). Is this mismatch can cause problems is I use related api ?Yes. Mismatch of types is a really bad error for c interaction. -Steve
Nov 26 2023