Closed jnovack closed 5 years ago
It looks strange. Function sched_setscheduler
doesn't declared locally and taken from outside public API (#include write
, memset
, etc., and they do not have such warning.
I will not accept this change until no explanation will be found on this strange warning.
I ran the following to produce the error.
$ go vet ./...
My go vet -v .
produce no warning:
root@orangepizero:~/gocode/src/github.com/d2r2/go-dht# go vet -v .
github.com/d2r2/go-dht
# github.com/d2r2/go-dht
Checking file ./logger.go
Checking file $WORK/b001/_cgo_gotypes.go
Checking file $WORK/b001/dht.cgo1.go
Checking file $WORK/b001/_cgo_import.go
root@orangepizero:~/gocode/src/github.com/d2r2/go-dht#
Could you run your go vet
with -v option?
And give me extra output of uname -a
- I just curious what platform you use.
BTW, one person send me errors he got when he is trying to compile directly on macOS Mojave platform:
$ go get -u github.com/d2r2/go-dht ld: library not found for -lrt clang: error: linker command failed with exit code 1 (use -v to see invocation) In file included from ../../d2r2/go-dht/dht.go:3: ../../d2r2/go-dht/dht.go.h:304:15: warning: implicit declaration of function 'sched_setscheduler' is invalid in C99 [-Wimplicit-function-declaration] ../../d2r2/go-dht/dht.go.h:317:15: warning: implicit declaration of function 'sched_setscheduler' is invalid in C99 [-Wimplicit-function-declaration]
As you can see there are some additional warnings with sched_setscheduler
function.
That is why I am asking you to send me uname -a
extra output.
I'm on Mojave as well. It makes sense that sched_setscheduler
is not warning on linux.