Skip to content

Replace macos and windows client implementations with a generic one#87

Open
sorindumitru wants to merge 1 commit into
google:mainfrom
sorindumitru:other
Open

Replace macos and windows client implementations with a generic one#87
sorindumitru wants to merge 1 commit into
google:mainfrom
sorindumitru:other

Conversation

@sorindumitru

Copy link
Copy Markdown

It looks like the client here is only supported on Linux. There's two implementations for 2 OSs, I assume to prevent build failures when using the library from those systems. I'd like to be able to do the same for FreeBSD. Instead of adding a client_freebsd.go, it might be best to just have an implementation for non-linux OSs.

This seems to build ok (I don't actually have a FreeBSD system available):

# Before
% GOOS=freebsd go test ./client/
# github.com/google/go-tdx-guest/client [github.com/google/go-tdx-guest/client.test]
client/client.go:147:17: undefined: OpenDevice
client/client_test.go:60:17: undefined: OpenDevice
FAIL    github.com/google/go-tdx-guest/client [build failed]
FAIL
# Now
% GOOS=freebsd go test ./client/
signal: segmentation fault (core dumped)
FAIL    github.com/google/go-tdx-guest/client   0.054s
FAIL

It looks like the client here is only supported on Linux. There's two implementations for 2 OSs, I assume to prevent build failures when using the library from those systems. I'd like to be able to do the same for FreeBSD. Instead of adding a client_freebsd.go, it might be best to just have an implementation for non-linux OSs

Signed-off-by: Sorin Dumitru <sorin@returnze.ro>
@google-cla

google-cla Bot commented Jan 20, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

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.

1 participant