examples: Example still use IPPROTO_CTP from in.h

../src/examples/ecore/ecore_fd_handler_gnutls_example.c: In function ‘tcp_connect’:
../src/examples/ecore/ecore_fd_handler_gnutls_example.c:93:23: error: storage size of ‘sa’ isn’t known
    struct sockaddr_in sa;
                       ^~
../src/examples/ecore/ecore_fd_handler_gnutls_example.c:101:19: error: ‘IPPROTO_TCP’ undeclared (first use in this function)
    setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, (char *)&flag, sizeof(int));
                   ^~~~~~~~~~~
../src/examples/ecore/ecore_fd_handler_gnutls_example.c:101:19: note: each undeclared identifier is reported only once for each function it appears in
../src/examples/ecore/ecore_fd_handler_gnutls_example.c:106:4: warning: implicit declaration of function ‘inet_pton’; did you mean ‘eina_htonl’? [-Wimplicit-function-declaration]
    inet_pton(AF_INET, SERVER, &sa.sin_addr);
    ^~~~~~~~~
    eina_htonl
../src/examples/ecore/ecore_fd_handler_gnutls_example.c:93:23: warning: unused variable ‘sa’ [-Wunused-variable]
    struct sockaddr_in sa;
                       ^~
Reviewers: vtorri, raster, zmike

Reviewed By: zmike

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D7867
This commit is contained in:
Lauro Moura 2019-02-01 13:54:35 -05:00 committed by Mike Blumenkrantz
parent f7c560c311
commit e414450404
1 changed files with 3 additions and 0 deletions

View File

@ -9,6 +9,9 @@
#ifdef HAVE_NETINET_TCP_H
# include <netinet/tcp.h>
#endif
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
#endif
#ifdef HAVE_SYS_SOCKET_H
# include <sys/socket.h>
#endif