ipsn / go-libtor

Self-contained Tor from Go
BSD 3-Clause "New" or "Revised" License
544 stars 46 forks source link

Error when build #41

Open efairon opened 12 months ago

efairon commented 12 months ago

go build -v -x tor.go

go version 1.20.5 / Linux

# github.com/ipsn/go-libtor/libtor
In file included from ../go/pkg/mod/github.com/ipsn/go-libtor@v1.0.380/libtor/../libevent/compat/../evutil_rand.c:134,
                 from ../go/pkg/mod/github.com/ipsn/go-libtor@v1.0.380/libtor/libevent_evutil_rand.go:8:
../go/pkg/mod/github.com/ipsn/go-libtor@v1.0.380/libtor/../libevent/compat/.././arc4random.c:467:1: error: static declaration of ‘arc4random_buf’ follows non-static declaration
  467 | arc4random_buf(void *buf_, size_t n)
      | ^~~~~~~~~~~~~~
In file included from ../go/pkg/mod/github.com/ipsn/go-libtor@v1.0.380/libtor/../libevent/compat/../util-internal.h:37,
                 from ../go/pkg/mod/github.com/ipsn/go-libtor@v1.0.380/libtor/../libevent/compat/../evutil_rand.c:40:
/usr/include/stdlib.h:542:13: note: previous declaration of ‘arc4random_buf’ with type ‘void(void *, size_t)’ {aka ‘void(void *, long unsigned int)’}
  542 | extern void arc4random_buf (void *__buf, size_t __size)
AnAverageBeing commented 4 months ago

same

0xffffa commented 2 weeks ago

any fixs?