Date: Wed, 18 Jan 2023 22:31:37 +0000 From: bugzilla-noreply@freebsd.org To: ports-bugs@FreeBSD.org Subject: [Bug 269039] net/libvncserver: error: use of undeclared identifier 'PF_INET' Message-ID: <bug-269039-7788@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D269039 Bug ID: 269039 Summary: net/libvncserver: error: use of undeclared identifier 'PF_INET' Product: Ports & Packages Version: Latest Hardware: Any OS: Any Status: New Severity: Affects Many People Priority: --- Component: Individual Port(s) Assignee: nc@FreeBSD.org Reporter: vvd@unislabs.com Assignee: nc@FreeBSD.org Flags: maintainer-feedback?(nc@FreeBSD.org) 13.1-p5 amd64. After this commit https://cgit.freebsd.org/ports/commit/?id=3D180d33e6f234e6c485ec29f7c4d2367= b06e28ef1 build fails: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:56:18: warning: implicit declaration of function 'accept' is invalid in C99 [-Wimplicit-function-declaration] proxy_sock =3D accept(data->local_listensock, (struct sockaddr *)&sin, &sinlen); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:63:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] rfbCloseSocket(data->local_listensock); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:117:6: note: expanded from macro 'rfbCloseSocket' _rfbCloseSocket(s); \ ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:107:25: note: expanded from macro '_rfbCloseSocket' #define _rfbCloseSocket close ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:94:19: warning: implicit declaration of function 'recv' is invalid in C99 [-Wimplicit-function-declaration] len =3D recv(proxy_sock, buf, sizeof(buf), 0); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:127:21: warning: implicit declaration of function 'send' is invalid in C99 [-Wimplicit-function-declaration] i =3D send(proxy_sock, buf + wr, len - wr, 0); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:146:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] rfbCloseSocket(proxy_sock); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:117:6: note: expanded from macro 'rfbCloseSocket' _rfbCloseSocket(s); \ ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:107:25: note: expanded from macro '_rfbCloseSocket' #define _rfbCloseSocket close ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:154:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] rfbCloseSocket(data->ssh_sock); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:117:6: note: expanded from macro 'rfbCloseSocket' _rfbCloseSocket(s); \ ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:107:25: note: expanded from macro '_rfbCloseSocket' #define _rfbCloseSocket close ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:213:22: warning: implicit declaration of function 'socket' is invalid in C99 [-Wimplicit-function-declaration] data->ssh_sock =3D socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:213:29: error: use of undeclared identifier 'PF_INET' data->ssh_sock =3D socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:213:38: error: use of undeclared identifier 'SOCK_STREAM' data->ssh_sock =3D socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:220:25: error: use of undeclared identifier 'AF_INET' hints.ai_family =3D AF_INET; ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:221:25: error: use of undeclared identifier 'SOCK_STREAM' hints.ai_socktype =3D SOCK_STREAM; ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:224:19: error: use of undeclared identifier 'AF_INET' sin.sin_family =3D AF_INET; ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:233:8: warning: implicit declaration of function 'connect' is invalid in C99 [-Wimplicit-function-declaration] if(connect(data->ssh_sock, (struct sockaddr*)(&sin), sizeof(struct sockaddr_in)) !=3D 0) { ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:288:37: error: use of undeclared identifier 'PF_INET' data->local_listensock =3D socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:288:46: error: use of undeclared identifier 'SOCK_STREAM' data->local_listensock =3D socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:293:22: error: use of undeclared identifier 'AF_INET' sin.sin_family =3D AF_INET; ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:301:14: warning: implicit declaration of function 'bind' is invalid in C99 [-Wimplicit-function-declaration] if(-1 =3D=3D bind(data->local_listensock, (struct sockaddr *)&sin, sinl= en)) { ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:305:14: warning: implicit declaration of function 'listen' is invalid in C99 [-Wimplicit-function-declaration] if(-1 =3D=3D listen(data->local_listensock, 1)) { ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:311:9: warning: implicit declaration of function 'getsockname' is invalid in C99 [-Wimplicit-function-declaration] if (getsockname(data->local_listensock, (struct sockaddr *)&sin, &sinle= n ) =3D=3D -1){ ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:340:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] rfbCloseSocket(data->local_listensock); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:117:6: note: expanded from macro 'rfbCloseSocket' _rfbCloseSocket(s); \ ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:107:25: note: expanded from macro '_rfbCloseSocket' #define _rfbCloseSocket close ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:341:5: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] rfbCloseSocket(data->ssh_sock); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:117:6: note: expanded from macro 'rfbCloseSocket' _rfbCloseSocket(s); \ ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:107:25: note: expanded from macro '_rfbCloseSocket' #define _rfbCloseSocket close ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= client_examples/sshtunnel.c:423:6: warning: implicit declaration of function 'close' is invalid in C99 [-Wimplicit-function-declaration] rfbCloseSocket(client->sock); ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:117:6: note: expanded from macro 'rfbCloseSocket' _rfbCloseSocket(s); \ ^ /tmp/work/usr/ports/net/libvncserver/work/libvncserver-LibVNCServer-0.9.14/= rfb/rfbproto.h:107:25: note: expanded from macro '_rfbCloseSocket' #define _rfbCloseSocket close ^ 14 warnings and 8 errors generated. =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Maybe maintainer forgot to commit patch file net/libvncserver/files/patch-client__examples_sshtunnel.c: --- client_examples/sshtunnel.c.orig +++ client_examples/sshtunnel.c @@ -10,6 +10,9 @@ * - added name resolution for the ssh host */ +#include <sys/types.h> +#include <sys/socket.h> +#include <unistd.h> #include <rfb/rfbclient.h> #include <libssh2.h> #include <arpa/inet.h> --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-269039-7788>