Hello. I'm trying to run libpki and ocspd on FreeBSD (and adding the software to portstree)
Build fails with errors:
../../libpki/net/sock.h:41:25: error: use of undeclared identifier 'SOCK_STREAM'
PKI_NET_SOCK_STREAM = SOCK_STREAM,
The cause is <sys/socket.h> is not included from src/libpki/net/sock.h
I can't understand the logic behind this code:
#ifdef HAVE_SYS_SOCKET_H
# include <sys/select.h>
#else
# include <sys/types.h>
# include <sys/socket.h>
#endif
Why aren't we including <sys/socket.h> when HAVE_SYS_SOCKET_H is defined?
It works on Linux because <sys/socket.h> is included in <netinet/in.h>. On FreeBSD it should be included explicitly.
The build works for me when I move # include <sys/socket.h> above "else", but I'm not sure if it's the right way to make it work on all platforms.
Could someone give some insight on the problem?
Hello. I'm trying to run libpki and ocspd on FreeBSD (and adding the software to portstree) Build fails with errors:
The cause is <sys/socket.h> is not included from src/libpki/net/sock.h I can't understand the logic behind this code:
Why aren't we including <sys/socket.h> when HAVE_SYS_SOCKET_H is defined?
It works on Linux because <sys/socket.h> is included in <netinet/in.h>. On FreeBSD it should be included explicitly. The build works for me when I move # include <sys/socket.h> above "else", but I'm not sure if it's the right way to make it work on all platforms. Could someone give some insight on the problem?