When building on linux, I get the following error:
# github.com/gen2brain/go-libtor/libtor
In file included from ../../../../pkg/mod/github.com/gen2brain/go-libtor@v1.2.0/libtor/../linux/libevent/compat/../evutil_rand.c:134,
from ../../../../pkg/mod/github.com/gen2brain/go-libtor@v1.2.0/libtor/linux_libevent_evutil_rand.go:9:
../../../../pkg/mod/github.com/gen2brain/go-libtor@v1.2.0/libtor/../linux/libevent/compat/.././arc4random.c:471:1: error: static declaration of ‘arc4random_buf’ follows non-static declaration
471 | arc4random_buf(void *buf_, size_t n)
| ^~~~~~~~~~~~~~
In file included from ../../../../pkg/mod/github.com/gen2brain/go-libtor@v1.2.0/libtor/../linux/libevent/compat/../util-internal.h:37,
from ../../../../pkg/mod/github.com/gen2brain/go-libtor@v1.2.0/libtor/../linux/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)
| ^~~~~~~~~~~~~~
I tried just commenting out these lines and it fixed my build, but I'm not really sure if that's an appropriate fix. If it is, I'm happy to PR removing these lines, but I figured it's worth discussing first.
When building on linux, I get the following error:
I tried just commenting out these lines and it fixed my build, but I'm not really sure if that's an appropriate fix. If it is, I'm happy to PR removing these lines, but I figured it's worth discussing first.