Closed Bug 1536613 Opened 6 years ago Closed 6 years ago

audioipc fails to build for 32-bit musl systems

Categories

(Core :: Audio/Video: cubeb, defect, P5)

66 Branch
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: johannes, Assigned: kinetik)

References

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:66.0) Gecko/20100101 Firefox/66.0

Steps to reproduce:

build firefox for armv7l-musl

attached patch fixes the bug

Actual results:

build fails:

11:57.22 error[E0560]: struct libc::cmsghdr has no field named __pad1
11:57.22 --> media/audioipc/audioipc/src/cmsg.rs:112:17
11:57.22 |
11:57.22 112 | __pad1: 0,
11:57.22 | ^^^^^^ libc::cmsghdr does not have this field
11:57.22 |
11:57.22 = note: available fields are: cmsg_len, cmsg_level, cmsg_type

This is because cmsghdr.__pad1 is not defined on 32-bit musl systems
The attached patch fixes this.

Expected results:

build should succeed

Component: Untriaged → Audio/Video: cubeb
Product: Firefox → Core
Rank: 45
Priority: -- → P5
Assignee: nobody → kinetik
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Thanks for the bug report and patch! I looked through the Rust libc definitions of cmsghdr and found that at least Fuschia also has a __pad1 field. Rather than try to keep a #cfg line up-to-date with the Rust libc definitions, I modified the code to use a zero-initialized cmsghdr to handle all current and any future padding.

PR for fix: https://github.com/djg/audioipc-2/pull/59

Makes sense. The patch looks good to me.
Thanks.

Fix will land via bug 1536605.

Depends on: 1536605
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: