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

Build problem on FreeBSD 12.2 #25

Open
paulfloyd opened this issue Dec 18, 2020 · 0 comments
Open

Build problem on FreeBSD 12.2 #25

paulfloyd opened this issue Dec 18, 2020 · 0 comments

Comments

@paulfloyd
Copy link

Hi again

This one looks easier to fix.

g++ -std=c++11 -g -fno-enforce-eh-specs -fno-stack-protector -fno-threadsafe-statics -fno-exceptions -fno-rtti -fdebug-prefix-map=../../libcody/= -W -Wall -include config.h -I../../libcody \
  -MMD -MP -MF netclient.d -c -o netclient.o ../../libcody/netclient.cc
../../libcody/netclient.cc: In function 'int Cody::OpenInet6(const char**, const char*, int)':
../../libcody/netclient.cc:114:3: error: 'sockaddr_in6' was not declared in this scope; did you mean 'sockaddr_un'?
  114 |   sockaddr_in6 addr;
      |   ^~~~~~~~~~~~
      |   sockaddr_un

My change to fix this

diff --git a/libcody/netclient.cc b/libcody/netclient.cc
index 8cccface71c..c97ed4ca126 100644
--- a/libcody/netclient.cc
+++ b/libcody/netclient.cc
@@ -14,6 +14,7 @@
 #include <unistd.h>
 #include <arpa/inet.h>
 #include <sys/un.h>
+#include <netinet/in.h>
 
 #ifndef AI_NUMERICSERV
 #define AI_NUMERICSERV 0
diff --git a/libcody/netserver.cc b/libcody/netserver.cc
index 7e43eb033f4..4e55089161e 100644
--- a/libcody/netserver.cc
+++ b/libcody/netserver.cc
@@ -13,6 +13,7 @@
 #include <unistd.h>
 #include <arpa/inet.h>
 #include <sys/un.h>
+#include <netinet/in.h>
 
 #ifndef AI_NUMERICSERV
 #define AI_NUMERICSERV 0

(not sure how OS neutral that header is)

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