Skip to content

fixed compilation error on linux - #4

Open
GhelloZ wants to merge 1 commit into
apple:mainfrom
GhelloZ:main
Open

fixed compilation error on linux#4
GhelloZ wants to merge 1 commit into
apple:mainfrom
GhelloZ:main

Conversation

@GhelloZ

@GhelloZ GhelloZ commented Jun 10, 2026

Copy link
Copy Markdown

Trying to build the project on linux before returned this error:

/home/user/Projects/pass-builder/Sources/buildpass/ReadCredential.swift:54:32: error: value of optional type 'UnsafeMutableRawPointer?' must be unwrapped to a value of type 'UnsafeMutableRawPointer'
52 |             memset_s(ptr.baseAddress, ptr.count, 0, ptr.count)
53 |             #else
54 |             explicit_bzero(ptr.baseAddress, ptr.count)
   |                                |- error: value of optional type 'UnsafeMutableRawPointer?' must be unwrapped to a value of type 'UnsafeMutableRawPointer'
   |                                |- note: coalesce using '??' to provide a default when the optional value contains 'nil'
   |                                `- note: force-unwrap using '!' to abort execution if the optional value contains 'nil'
55 |             #endif
56 |         }

with this commit it does. I haven't tested it on a mac tho

@shaun-merchant

Copy link
Copy Markdown
Contributor

Thanks for this! I’m unable to reproduce the compile error with the 6.4 toolchain:

TOOLCHAINS=org.swift.64202606011a swift build \
  --swift-sdk aarch64-swift-linux-musl \
  --product buildpass

Are you able to share the Swift toolchain version and the Linux distro & SDK that you’re building for to help us reproduce?

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