Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.2.3
-
FreeBSD build.brnrd.eu 11.0-RELEASE-p3 FreeBSD 11.0-RELEASE-p3 #0 r308890: Sun Nov 20 20:27:48 CET 2016 build@brnrd.eu:/usr/obj/usr/src/sys/BEASTIE110 amd64
Description
Building MariaDB client (-DWITHOUT_SERVER=1) returns a build error
[ 60%] Building C object libmariadb/libmariadb/CMakeFiles/mariadb_obj.dir/__/plugins/pvio/pvio_socket.c.o
|
cd /usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/libmariadb && /usr/bin/cc -DHAVE_AURORA=1 -DHAVE_AUTH_CLEARTEXT=1
|
-DHAVE_AUTH_DIALOG=1 -DHAVE_AUTH_NATIVE=1 -DHAVE_AUTH_OLDPASSWORD=1 -DHAVE_CONFIG_H -DHAVE_OPENSSL -DHAVE_REMOTEIO=1 -DHAVE_REPLICATION=1
|
-DHAVE_SOCKET=1 -DHAVE_TLS -DHAVE_TRACE_EXAMPLE=1 -DLIBICONV_PLUG -I/usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/i
|
nclude -I/usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/libmariadb -I/usr/local/include -O2 -fno-strict-aliasing -pi
|
pe -march=native -fstack-protector -O2 -fno-strict-aliasing -pipe -march=native -fstack-protector -DDBUG_OFF -DDBUG_OFF -D ENABLED_LOCA
|
L_INFILE -D HAVE_COMPRESS -D LIBMARIADB -D THREAD -fPIC -o CMakeFiles/mariadb_obj.dir/__/plugins/pvio/pvio_socket.c.o -c /usr/ports/datab
|
ases/mariadb102-client/work/mariadb-10.2.3/libmariadb/plugins/pvio/pvio_socket.c
|
In file included from /usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/plugins/pvio/pvio_socket.c:27:
|
In file included from /usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/include/ma_global.h:189:
|
/usr/include/sys/timeb.h:42:2: warning: "this file includes <sys/timeb.h> which is deprecated" [-W#warnings]
|
#warning "this file includes <sys/timeb.h> which is deprecated"
|
^
|
In file included from /usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/plugins/pvio/pvio_socket.c:51:
|
/usr/include/netinet/ip.h:69:17: error: field has incomplete type 'struct in_addr'
|
struct in_addr ip_src,ip_dst; /* source and dest address */
|
^
|
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr'
|
struct in_addr ip_src,ip_dst; /* source and dest address */
|
^
|
/usr/include/netinet/ip.h:69:24: error: field has incomplete type 'struct in_addr'
|
struct in_addr ip_src,ip_dst; /* source and dest address */
|
^
|
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr'
|
struct in_addr ip_src,ip_dst; /* source and dest address */
|
^
|
/usr/include/netinet/ip.h:181:19: error: field has incomplete type 'struct in_addr'
|
struct in_addr ipt_addr;
|
^
|
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr'
|
struct in_addr ip_src,ip_dst; /* source and dest address */
|
^
|
/usr/include/netinet/ip.h:216:17: error: field has incomplete type 'struct in_addr'
|
struct in_addr ippseudo_src; /* source internet address */
|
^
|
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr'
|
struct in_addr ip_src,ip_dst; /* source and dest address */
|
^
|
/usr/include/netinet/ip.h:217:17: error: field has incomplete type 'struct in_addr'
|
struct in_addr ippseudo_dst; /* destination internet address */
|
^
|
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr'
|
struct in_addr ip_src,ip_dst; /* source and dest address */
|
^
|
/usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/plugins/pvio/pvio_socket.c:703:34: error: use of undeclared
|
identifier 'IPPROTO_IP'
|
r= setsockopt(csock->socket, IPPROTO_IP, IP_TOS,
|
^
|
/usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/plugins/pvio/pvio_socket.c:703:46: error: use of undeclared
|
identifier 'IP_TOS'
|
r= setsockopt(csock->socket, IPPROTO_IP, IP_TOS,
|
^
|
/usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/plugins/pvio/pvio_socket.c:711:34: error: use of undeclared
|
identifier 'IPPROTO_TCP'
|
r= setsockopt(csock->socket, IPPROTO_TCP, TCP_NODELAY,
|
^
|
/usr/ports/databases/mariadb102-client/work/mariadb-10.2.3/libmariadb/plugins/pvio/pvio_socket.c:803:24: error: use of undeclared
|
identifier 'IPPROTO_TCP'
|
hints.ai_protocol= IPPROTO_TCP; /* TCP connections only */
|
^
|
1 warning and 9 errors generated.
|
*** Error code 1
|
 |
Stop.
|
Due to missing netinet/in.h include. Afrer applying this patch, compilation is succesful
--- libmariadb/plugins/pvio/pvio_socket.c.orig 2016-12-22 11:09:46.000000000 +0100
|
+++ libmariadb/plugins/pvio/pvio_socket.c 2017-01-15 10:58:13.683432000 +0100
|
@@ -48,6 +48,7 @@
|
#include <fcntl.h>
|
#endif
|
#include <netinet/in_systm.h>
|
+#include <netinet/in.h>
|
#include <netinet/ip.h>
|
#include <netdb.h>
|
#include <netinet/tcp.h>
|