examples: Example still use IPPROTO_CTP from in.h
authorLauro Moura <lauromoura@expertisesolutions.com.br>
Fri, 1 Feb 2019 18:54:35 +0000 (13:54 -0500)
committerJongmin Lee <jm105.lee@samsung.com>
Wed, 6 Feb 2019 22:20:24 +0000 (07:20 +0900)
../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

src/examples/ecore/ecore_fd_handler_gnutls_example.c

index 6547809..fcd758e 100644 (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