runtime: gcc_libinit.c _cgo_try_pthread_create 'EAGAIN' undeclared #40617
Labels
Milestone
Comments
The file runtime/cgo/gcc_libinit.c has a line |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem
Hi, I'm getting the below error when compiling a CGO project.
The C code compiles successfully. This seems to be an issue in CGO ?
Some basic investigation
I checked the code in
/usr/local/go/src/runtime/cgo/gcc_libinit.c
and it does include#include <errno.h>
. But still the error'EAGAIN' undeclared
appears.https://github.com/golang/go/blob/master/src/runtime/cgo/gcc_libinit.c#L9
Workaround
#define EAGAIN 11
in/usr/local/go/src/runtime/cgo/gcc_libinit.c
solves this.Or,
#include <asm-generic/errno.h>
in/usr/local/go/src/runtime/cgo/gcc_libinit.c
solves this.Other details
The text was updated successfully, but these errors were encountered: