Skip to content

Conversation

@sthahemant1st
Copy link

@sthahemant1st sthahemant1st commented May 19, 2025

Adds support for musl-based Linux

Description

Problem: When building the package using the Swift Container Plugin (which relies on a musl-based Linux environment), the build failed because the package only supported Glibc.

Solution: Added conditional imports to check if if Musl can be imported. Where appropriate, replaced Glibc-specific functions with Musl equivalents to ensure compatibility. This enables the package to build successfully in musl-based environments, such as those used by the Swift Container Plugin.

How Has This Been Tested?

A GitHub Actions workflow was added to build the project in both:

  • A standard Glibc-based Linux environment
  • A musl-based environment using the Swift Static SDK, which is used internally by the Swift Container Plugin

This verifies compatibility in both cases.

Checklist:

  • [ x] I have submitted a CLA form
  • [ x] If applicable, I have updated the documentation accordingly.
  • [ x] If applicable, I have added tests to cover my changes.

@CLAassistant
Copy link

CLAassistant commented May 19, 2025

CLA assistant check
All committers have signed the CLA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants