Skip to content

Go bindings don't build for Android x86_64 (struct sigaction init) #288

Closed

Description

@ChrisBQu

bindings/go/blst.go, line 27, does:
struct sigaction act = { handler }, oact;

On Android 64-bit, Bionic's struct sigaction has int sa_flags as its first field, not the handler. See: https://github.com/aosp-mirror/platform_bionic/blob/731631f300090436d7f5df80d50b6275c8c60a93/libc/include/bits/signal_types.h#L101-L122

Because of that this fails with the NDK's x86_64 clang:

error: incompatible pointer to integer conversion initializing 'int' with an expression of type 'void (int)' [-Wint-conversion]

Using { .sa_handler = handler } should fix this, I think.

This was seen on v0.3.16, building for GOOS=android GOARCH=amd64

Activity

  1. dot-asm commented on Sep 25, 2026

    @dot-asm
    Collaborator

    Ouch! Since cgo already assumes at least C99, which added the designated initializer, the suggested solution does the trick. Thanks!

  2. added a commit that references this issue on Sep 25, 2026
    4f72b30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions