Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning when running in docker #34

Open
neo4u opened this issue Nov 11, 2021 · 2 comments
Open

Warning when running in docker #34

neo4u opened this issue Nov 11, 2021 · 2 comments

Comments

@neo4u
Copy link

neo4u commented Nov 11, 2021

Hi Team,

I'm getting this warning when doing docker build in my go project that uses this library:

#10 257.1 # github.com/ipsn/go-libtor/libtor
#10 257.1 In file included from /go/pkg/mod/github.com/ipsn/go-libtor@v1.0.380/libtor/../tor/src/../src/lib/crypt_ops/crypto_rand.c:70,
#10 257.1                  from /go/pkg/mod/github.com/ipsn/go-libtor@v1.0.380/libtor/tor_src_lib_crypt_ops_crypto_rand.go:9:
#10 257.1 /usr/include/sys/fcntl.h:1:2: warning: #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h> [-Wcpp]
#10 257.1     1 | #warning redirecting incorrect #include <sys/fcntl.h> to <fcntl.h>
#10 257.1       |  ^~~~~~~
#10 DONE 260.1s

Any idea as to how to fix? I know it's just a warning, but wanted to avoid a future error due to header linkage.

@neo4u
Copy link
Author

neo4u commented Nov 11, 2021

I think the fix maybe to change this from

#include <sys/fcntl.h>

to

#include <fcntl.h>

Like in this PR for a different project using the same library.

@neo4u
Copy link
Author

neo4u commented Nov 11, 2021

@karalabe Let me know if this makes sense to do?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant