summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-11-18 12:52:08 -0200
committerGustavo Sverzut Barbieri <barbieri@profusion.mobi>2016-11-18 12:53:32 -0200
commit371a3332efe86596531af90104b4fad45df87c2c (patch)
treec17595bd618f514bafdc1c98d62d62380dd98d79
parent8d24622f57bdb7ee4c25927d8fbf3321fadae40a (diff)
efl_net: remove getsockopt()/setsockopt() warning on windows.
windows is nasty and defines the value to be set or retrieved as 'char *', which triggers a warning when we use another kind of pointer. Partially addresses D4357.
-rw-r--r--src/lib/ecore_con/ecore_con.c16
-rw-r--r--src/lib/ecore_con/efl_net_dialer_udp.c4
-rw-r--r--src/lib/ecore_con/efl_net_server_fd.c10
-rw-r--r--src/lib/ecore_con/efl_net_server_tcp.c4
-rw-r--r--src/lib/ecore_con/efl_net_server_udp.c8
-rw-r--r--src/lib/ecore_con/efl_net_socket_tcp.c12
-rw-r--r--src/lib/ecore_con/efl_net_socket_udp.c16
7 files changed, 35 insertions, 35 deletions
diff --git a/src/lib/ecore_con/ecore_con.c b/src/lib/ecore_con/ecore_con.c
index 14698b54ef..18087c9e2b 100644
--- a/src/lib/ecore_con/ecore_con.c
+++ b/src/lib/ecore_con/ecore_con.c
@@ -5271,7 +5271,7 @@ efl_net_multicast_join(SOCKET fd, int family, const char *address)
5271 if (err) 5271 if (err)
5272 return err; 5272 return err;
5273 5273
5274 if (setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq)) == 0) 5274 if (setsockopt(fd, IPPROTO_IP, IP_ADD_MEMBERSHIP, (const char *)&mreq, sizeof(mreq)) == 0)
5275 return 0; 5275 return 0;
5276 } 5276 }
5277 else if (family == AF_INET6) 5277 else if (family == AF_INET6)
@@ -5282,7 +5282,7 @@ efl_net_multicast_join(SOCKET fd, int family, const char *address)
5282 if (err) 5282 if (err)
5283 return err; 5283 return err;
5284 5284
5285 if (setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq)) == 0) 5285 if (setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&mreq, sizeof(mreq)) == 0)
5286 return 0; 5286 return 0;
5287 } 5287 }
5288 else 5288 else
@@ -5307,7 +5307,7 @@ efl_net_multicast_leave(SOCKET fd, int family, const char *address)
5307 if (err) 5307 if (err)
5308 return err; 5308 return err;
5309 5309
5310 if (setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, &mreq, sizeof(mreq)) == 0) 5310 if (setsockopt(fd, IPPROTO_IP, IP_DROP_MEMBERSHIP, (const char *)&mreq, sizeof(mreq)) == 0)
5311 return 0; 5311 return 0;
5312 } 5312 }
5313 else if (family == AF_INET6) 5313 else if (family == AF_INET6)
@@ -5318,7 +5318,7 @@ efl_net_multicast_leave(SOCKET fd, int family, const char *address)
5318 if (err) 5318 if (err)
5319 return err; 5319 return err;
5320 5320
5321 if (setsockopt(fd, IPPROTO_IPV6, IPV6_LEAVE_GROUP, &mreq, sizeof(mreq)) == 0) 5321 if (setsockopt(fd, IPPROTO_IPV6, IPV6_LEAVE_GROUP, (const char *)&mreq, sizeof(mreq)) == 0)
5322 return 0; 5322 return 0;
5323 } 5323 }
5324 else 5324 else
@@ -5341,7 +5341,7 @@ efl_net_multicast_ttl_set(SOCKET fd, int family, uint8_t ttl)
5341 int value = ttl; 5341 int value = ttl;
5342#endif 5342#endif
5343 5343
5344 if (setsockopt(fd, level, opt, &value, sizeof(value)) == 0) 5344 if (setsockopt(fd, level, opt, (const char *)&value, sizeof(value)) == 0)
5345 return 0; 5345 return 0;
5346 5346
5347 return efl_net_socket_error_get(); 5347 return efl_net_socket_error_get();
@@ -5360,7 +5360,7 @@ efl_net_multicast_ttl_get(SOCKET fd, int family, uint8_t *ttl)
5360 socklen_t valuelen = sizeof(value); 5360 socklen_t valuelen = sizeof(value);
5361#endif 5361#endif
5362 5362
5363 if (getsockopt(fd, level, opt, &value, &valuelen) == 0) 5363 if (getsockopt(fd, level, opt, (char *)&value, &valuelen) == 0)
5364 { 5364 {
5365 *ttl = value; 5365 *ttl = value;
5366 return 0; 5366 return 0;
@@ -5380,7 +5380,7 @@ efl_net_multicast_loopback_set(SOCKET fd, int family, Eina_Bool loopback)
5380 int value = loopback; 5380 int value = loopback;
5381#endif 5381#endif
5382 5382
5383 if (setsockopt(fd, level, opt, &value, sizeof(value)) == 0) 5383 if (setsockopt(fd, level, opt, (const char *)&value, sizeof(value)) == 0)
5384 return 0; 5384 return 0;
5385 5385
5386 return efl_net_socket_error_get(); 5386 return efl_net_socket_error_get();
@@ -5399,7 +5399,7 @@ efl_net_multicast_loopback_get(SOCKET fd, int family, Eina_Bool *loopback)
5399 socklen_t valuelen = sizeof(value); 5399 socklen_t valuelen = sizeof(value);
5400#endif 5400#endif
5401 5401
5402 if (getsockopt(fd, level, opt, &value, &valuelen) == 0) 5402 if (getsockopt(fd, level, opt, (char *)&value, &valuelen) == 0)
5403 { 5403 {
5404 *loopback = !!value; 5404 *loopback = !!value;
5405 return 0; 5405 return 0;
diff --git a/src/lib/ecore_con/efl_net_dialer_udp.c b/src/lib/ecore_con/efl_net_dialer_udp.c
index 5a1a331878..327a629fe8 100644
--- a/src/lib/ecore_con/efl_net_dialer_udp.c
+++ b/src/lib/ecore_con/efl_net_dialer_udp.c
@@ -131,7 +131,7 @@ _efl_net_dialer_udp_resolved_bind(Eo *o, Efl_Net_Dialer_Udp_Data *pd EINA_UNUSED
131#else 131#else
132 int enable = 1; 132 int enable = 1;
133#endif 133#endif
134 if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST, &enable, sizeof(enable)) == 0) 134 if (setsockopt(fd, SOL_SOCKET, SO_BROADCAST, (const char *)&enable, sizeof(enable)) == 0)
135 DBG("enabled SO_BROADCAST for socket=" SOCKET_FMT, fd); 135 DBG("enabled SO_BROADCAST for socket=" SOCKET_FMT, fd);
136 else 136 else
137 WRN("could not enable SO_BROADCAST for socket=" SOCKET_FMT ": %s", fd, eina_error_msg_get(efl_net_socket_error_get())); 137 WRN("could not enable SO_BROADCAST for socket=" SOCKET_FMT ": %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
@@ -145,7 +145,7 @@ _efl_net_dialer_udp_resolved_bind(Eo *o, Efl_Net_Dialer_Udp_Data *pd EINA_UNUSED
145 struct ipv6_mreq mreq = { 145 struct ipv6_mreq mreq = {
146 .ipv6mr_multiaddr = a->sin6_addr, 146 .ipv6mr_multiaddr = a->sin6_addr,
147 }; 147 };
148 if (setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, &mreq, sizeof(mreq)) == 0) 148 if (setsockopt(fd, IPPROTO_IPV6, IPV6_JOIN_GROUP, (const char *)&mreq, sizeof(mreq)) == 0)
149 { 149 {
150 efl_net_ip_port_fmt(buf, sizeof(buf), addr->ai_addr); 150 efl_net_ip_port_fmt(buf, sizeof(buf), addr->ai_addr);
151 DBG("joined multicast group %s socket=" SOCKET_FMT, buf, fd); 151 DBG("joined multicast group %s socket=" SOCKET_FMT, buf, fd);
diff --git a/src/lib/ecore_con/efl_net_server_fd.c b/src/lib/ecore_con/efl_net_server_fd.c
index 418dd34852..c771e9dcf5 100644
--- a/src/lib/ecore_con/efl_net_server_fd.c
+++ b/src/lib/ecore_con/efl_net_server_fd.c
@@ -228,7 +228,7 @@ _efl_net_server_fd_socket_activate(Eo *o, Efl_Net_Server_Fd_Data *pd EINA_UNUSED
228 int family; 228 int family;
229 socklen_t len = sizeof(family); 229 socklen_t len = sizeof(family);
230 230
231 if (getsockopt(fd, SOL_SOCKET, SO_DOMAIN, &family, &len) != 0) 231 if (getsockopt(fd, SOL_SOCKET, SO_DOMAIN, (char *)&family, &len) != 0)
232 { 232 {
233 WRN("socket " SOCKET_FMT " failed to return family: %s", fd, eina_error_msg_get(efl_net_socket_error_get())); 233 WRN("socket " SOCKET_FMT " failed to return family: %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
234 return EINVAL; 234 return EINVAL;
@@ -329,7 +329,7 @@ _efl_net_server_fd_reuse_address_set(Eo *o, Efl_Net_Server_Fd_Data *pd, Eina_Boo
329 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */ 329 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */
330 330
331 value = reuse_address; 331 value = reuse_address;
332 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(value)) != 0) 332 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char *)&value, sizeof(value)) != 0)
333 { 333 {
334 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR, %d): %s", 334 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR, %d): %s",
335 fd, value, eina_error_msg_get(efl_net_socket_error_get())); 335 fd, value, eina_error_msg_get(efl_net_socket_error_get()));
@@ -354,7 +354,7 @@ _efl_net_server_fd_reuse_address_get(Eo *o, Efl_Net_Server_Fd_Data *pd)
354 * elsewhere by nasty users. 354 * elsewhere by nasty users.
355 */ 355 */
356 valuelen = sizeof(value); 356 valuelen = sizeof(value);
357 if (getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &value, &valuelen) != 0) 357 if (getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&value, &valuelen) != 0)
358 { 358 {
359 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR): %s", 359 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR): %s",
360 fd, eina_error_msg_get(efl_net_socket_error_get())); 360 fd, eina_error_msg_get(efl_net_socket_error_get()));
@@ -381,7 +381,7 @@ _efl_net_server_fd_reuse_port_set(Eo *o, Efl_Net_Server_Fd_Data *pd, Eina_Bool r
381 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */ 381 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */
382 382
383 value = reuse_port; 383 value = reuse_port;
384 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &value, sizeof(value)) != 0) 384 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (const char *)&value, sizeof(value)) != 0)
385 { 385 {
386 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEPORT, %d): %s", 386 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEPORT, %d): %s",
387 fd, value, eina_error_msg_get(efl_net_socket_error_get())); 387 fd, value, eina_error_msg_get(efl_net_socket_error_get()));
@@ -408,7 +408,7 @@ _efl_net_server_fd_reuse_port_get(Eo *o, Efl_Net_Server_Fd_Data *pd)
408 * elsewhere by nasty users. 408 * elsewhere by nasty users.
409 */ 409 */
410 valuelen = sizeof(value); 410 valuelen = sizeof(value);
411 if (getsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &value, &valuelen) != 0) 411 if (getsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (char *)&value, &valuelen) != 0)
412 { 412 {
413 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEPORT): %s", 413 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEPORT): %s",
414 fd, eina_error_msg_get(efl_net_socket_error_get())); 414 fd, eina_error_msg_get(efl_net_socket_error_get()));
diff --git a/src/lib/ecore_con/efl_net_server_tcp.c b/src/lib/ecore_con/efl_net_server_tcp.c
index abefc74f75..03afd897d8 100644
--- a/src/lib/ecore_con/efl_net_server_tcp.c
+++ b/src/lib/ecore_con/efl_net_server_tcp.c
@@ -322,7 +322,7 @@ _efl_net_server_tcp_ipv6_only_set(Eo *o, Efl_Net_Server_Tcp_Data *pd, Eina_Bool
322 if (fd == INVALID_SOCKET) return; 322 if (fd == INVALID_SOCKET) return;
323 if (efl_net_server_fd_family_get(o) != AF_INET6) return; 323 if (efl_net_server_fd_family_get(o) != AF_INET6) return;
324 324
325 if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &value, sizeof(value)) != 0) 325 if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const char *)&value, sizeof(value)) != 0)
326 { 326 {
327 ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get())); 327 ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get()));
328 pd->ipv6_only = old; 328 pd->ipv6_only = old;
@@ -347,7 +347,7 @@ _efl_net_server_tcp_ipv6_only_get(Eo *o EINA_UNUSED, Efl_Net_Server_Tcp_Data *pd
347 if (efl_net_server_fd_family_get(o) != AF_INET6) goto end; 347 if (efl_net_server_fd_family_get(o) != AF_INET6) goto end;
348 348
349 valuelen = sizeof(value); 349 valuelen = sizeof(value);
350 if (getsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &value, &valuelen) != 0) 350 if (getsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&value, &valuelen) != 0)
351 { 351 {
352 WRN("getsockopt(" SOCKET_FMT ", IPPROTO_IPV6, IPV6_V6ONLY): %s", fd, eina_error_msg_get(efl_net_socket_error_get())); 352 WRN("getsockopt(" SOCKET_FMT ", IPPROTO_IPV6, IPV6_V6ONLY): %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
353 goto end; 353 goto end;
diff --git a/src/lib/ecore_con/efl_net_server_udp.c b/src/lib/ecore_con/efl_net_server_udp.c
index 1bf1d0e4fc..6e38a8f27f 100644
--- a/src/lib/ecore_con/efl_net_server_udp.c
+++ b/src/lib/ecore_con/efl_net_server_udp.c
@@ -413,7 +413,7 @@ _efl_net_server_udp_ipv6_only_set(Eo *o, Efl_Net_Server_Udp_Data *pd, Eina_Bool
413 if (fd == INVALID_SOCKET) return; 413 if (fd == INVALID_SOCKET) return;
414 if (efl_net_server_fd_family_get(o) != AF_INET6) return; 414 if (efl_net_server_fd_family_get(o) != AF_INET6) return;
415 415
416 if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &value, sizeof(value)) != 0) 416 if (setsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (const char *)&value, sizeof(value)) != 0)
417 { 417 {
418 ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get())); 418 ERR("could not set socket=" SOCKET_FMT " IPV6_V6ONLY=%d: %s", fd, value, eina_error_msg_get(efl_net_socket_error_get()));
419 pd->ipv6_only = old; 419 pd->ipv6_only = old;
@@ -438,7 +438,7 @@ _efl_net_server_udp_ipv6_only_get(Eo *o EINA_UNUSED, Efl_Net_Server_Udp_Data *pd
438 if (efl_net_server_fd_family_get(o) != AF_INET6) goto end; 438 if (efl_net_server_fd_family_get(o) != AF_INET6) goto end;
439 439
440 valuelen = sizeof(value); 440 valuelen = sizeof(value);
441 if (getsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, &value, &valuelen) != 0) 441 if (getsockopt(fd, IPPROTO_IPV6, IPV6_V6ONLY, (char *)&value, &valuelen) != 0)
442 { 442 {
443 WRN("getsockopt(" SOCKET_FMT ", IPPROTO_IPV6, IPV6_V6ONLY): %s", fd, eina_error_msg_get(efl_net_socket_error_get())); 443 WRN("getsockopt(" SOCKET_FMT ", IPPROTO_IPV6, IPV6_V6ONLY): %s", fd, eina_error_msg_get(efl_net_socket_error_get()));
444 goto end; 444 goto end;
@@ -465,7 +465,7 @@ _efl_net_server_udp_dont_route_set(Eo *o, Efl_Net_Server_Udp_Data *pd, Eina_Bool
465 465
466 if (fd == INVALID_SOCKET) return EINA_TRUE; 466 if (fd == INVALID_SOCKET) return EINA_TRUE;
467 467
468 if (setsockopt(fd, SOL_SOCKET, SO_DONTROUTE, &value, sizeof(value)) != 0) 468 if (setsockopt(fd, SOL_SOCKET, SO_DONTROUTE, (const char *)&value, sizeof(value)) != 0)
469 { 469 {
470 Eina_Error err = efl_net_socket_error_get(); 470 Eina_Error err = efl_net_socket_error_get();
471 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE, %u): %s", fd, dont_route, eina_error_msg_get(err)); 471 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE, %u): %s", fd, dont_route, eina_error_msg_get(err));
@@ -493,7 +493,7 @@ _efl_net_server_udp_dont_route_get(Eo *o, Efl_Net_Server_Udp_Data *pd)
493 * elsewhere by nasty users. 493 * elsewhere by nasty users.
494 */ 494 */
495 valuelen = sizeof(value); 495 valuelen = sizeof(value);
496 if (getsockopt(fd, SOL_SOCKET, SO_DONTROUTE, &value, &valuelen) != 0) 496 if (getsockopt(fd, SOL_SOCKET, SO_DONTROUTE, (char *)&value, &valuelen) != 0)
497 { 497 {
498 Eina_Error err = efl_net_socket_error_get(); 498 Eina_Error err = efl_net_socket_error_get();
499 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE): %s", fd, eina_error_msg_get(err)); 499 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE): %s", fd, eina_error_msg_get(err));
diff --git a/src/lib/ecore_con/efl_net_socket_tcp.c b/src/lib/ecore_con/efl_net_socket_tcp.c
index 3a75e39d09..0948b35929 100644
--- a/src/lib/ecore_con/efl_net_socket_tcp.c
+++ b/src/lib/ecore_con/efl_net_socket_tcp.c
@@ -102,7 +102,7 @@ _efl_net_socket_tcp_keep_alive_set(Eo *o, Efl_Net_Socket_Tcp_Data *pd, Eina_Bool
102 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */ 102 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */
103 103
104 value = keep_alive; 104 value = keep_alive;
105 if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &value, sizeof(value)) != 0) 105 if (setsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (const char *)&value, sizeof(value)) != 0)
106 { 106 {
107 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_KEEPALIVE, %d): %s", 107 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_KEEPALIVE, %d): %s",
108 fd, value, eina_error_msg_get(efl_net_socket_error_get())); 108 fd, value, eina_error_msg_get(efl_net_socket_error_get()));
@@ -132,7 +132,7 @@ _efl_net_socket_tcp_keep_alive_get(Eo *o, Efl_Net_Socket_Tcp_Data *pd)
132 * elsewhere by nasty users. 132 * elsewhere by nasty users.
133 */ 133 */
134 valuelen = sizeof(value); 134 valuelen = sizeof(value);
135 if (getsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, &value, &valuelen) != 0) 135 if (getsockopt(fd, SOL_SOCKET, SO_KEEPALIVE, (char *)&value, &valuelen) != 0)
136 { 136 {
137 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_KEEPALIVE): %s", 137 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_KEEPALIVE): %s",
138 fd, eina_error_msg_get(efl_net_socket_error_get())); 138 fd, eina_error_msg_get(efl_net_socket_error_get()));
@@ -160,7 +160,7 @@ _efl_net_socket_tcp_no_delay_set(Eo *o, Efl_Net_Socket_Tcp_Data *pd, Eina_Bool n
160 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */ 160 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */
161 161
162 value = no_delay; 162 value = no_delay;
163 if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &value, sizeof(value)) != 0) 163 if (setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (const char *)&value, sizeof(value)) != 0)
164 { 164 {
165 ERR("setsockopt(" SOCKET_FMT ", IPPROTO_TCP, TCP_NODELAY, %d): %s", 165 ERR("setsockopt(" SOCKET_FMT ", IPPROTO_TCP, TCP_NODELAY, %d): %s",
166 fd, value, eina_error_msg_get(efl_net_socket_error_get())); 166 fd, value, eina_error_msg_get(efl_net_socket_error_get()));
@@ -190,7 +190,7 @@ _efl_net_socket_tcp_no_delay_get(Eo *o, Efl_Net_Socket_Tcp_Data *pd)
190 * elsewhere by nasty users. 190 * elsewhere by nasty users.
191 */ 191 */
192 valuelen = sizeof(value); 192 valuelen = sizeof(value);
193 if (getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &value, &valuelen) != 0) 193 if (getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, (char *)&value, &valuelen) != 0)
194 { 194 {
195 ERR("getsockopt(" SOCKET_FMT ", IPPROTO_TCP, TCP_NODELAY): %s", 195 ERR("getsockopt(" SOCKET_FMT ", IPPROTO_TCP, TCP_NODELAY): %s",
196 fd, eina_error_msg_get(efl_net_socket_error_get())); 196 fd, eina_error_msg_get(efl_net_socket_error_get()));
@@ -234,7 +234,7 @@ _efl_net_socket_tcp_cork_set(Eo *o, Efl_Net_Socket_Tcp_Data *pd, Eina_Bool cork)
234 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */ 234 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */
235 235
236 value = cork; 236 value = cork;
237 if (setsockopt(fd, IPPROTO_TCP, option, &value, sizeof(value)) != 0) 237 if (setsockopt(fd, IPPROTO_TCP, option, (const char *)&value, sizeof(value)) != 0)
238 { 238 {
239 ERR("setsockopt(" SOCKET_FMT ", IPPROTO_TCP, 0x%x, %d): %s", 239 ERR("setsockopt(" SOCKET_FMT ", IPPROTO_TCP, 0x%x, %d): %s",
240 fd, option, value, eina_error_msg_get(efl_net_socket_error_get())); 240 fd, option, value, eina_error_msg_get(efl_net_socket_error_get()));
@@ -267,7 +267,7 @@ _efl_net_socket_tcp_cork_get(Eo *o, Efl_Net_Socket_Tcp_Data *pd)
267 * elsewhere by nasty users. 267 * elsewhere by nasty users.
268 */ 268 */
269 valuelen = sizeof(value); 269 valuelen = sizeof(value);
270 if (getsockopt(fd, IPPROTO_TCP, option, &value, &valuelen) != 0) 270 if (getsockopt(fd, IPPROTO_TCP, option, (char *)&value, &valuelen) != 0)
271 { 271 {
272 ERR("getsockopt(" SOCKET_FMT ", IPPROTO_TCP, 0x%x): %s", 272 ERR("getsockopt(" SOCKET_FMT ", IPPROTO_TCP, 0x%x): %s",
273 fd, option, eina_error_msg_get(efl_net_socket_error_get())); 273 fd, option, eina_error_msg_get(efl_net_socket_error_get()));
diff --git a/src/lib/ecore_con/efl_net_socket_udp.c b/src/lib/ecore_con/efl_net_socket_udp.c
index e744717291..4e610f9560 100644
--- a/src/lib/ecore_con/efl_net_socket_udp.c
+++ b/src/lib/ecore_con/efl_net_socket_udp.c
@@ -246,7 +246,7 @@ _efl_net_socket_udp_cork_set(Eo *o, Efl_Net_Socket_Udp_Data *pd, Eina_Bool cork)
246 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */ 246 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */
247 247
248 value = cork; 248 value = cork;
249 if (setsockopt(fd, IPPROTO_UDP, option, &value, sizeof(value)) != 0) 249 if (setsockopt(fd, IPPROTO_UDP, option, (const char *)&value, sizeof(value)) != 0)
250 { 250 {
251 ERR("setsockopt(" SOCKET_FMT ", IPPROTO_UDP, 0x%x, %d): %s", 251 ERR("setsockopt(" SOCKET_FMT ", IPPROTO_UDP, 0x%x, %d): %s",
252 fd, option, value, eina_error_msg_get(efl_net_socket_error_get())); 252 fd, option, value, eina_error_msg_get(efl_net_socket_error_get()));
@@ -279,7 +279,7 @@ _efl_net_socket_udp_cork_get(Eo *o, Efl_Net_Socket_Udp_Data *pd)
279 * elsewhere by nasty users. 279 * elsewhere by nasty users.
280 */ 280 */
281 valuelen = sizeof(value); 281 valuelen = sizeof(value);
282 if (getsockopt(fd, IPPROTO_UDP, option, &value, &valuelen) != 0) 282 if (getsockopt(fd, IPPROTO_UDP, option, (char *)&value, &valuelen) != 0)
283 { 283 {
284 ERR("getsockopt(" SOCKET_FMT ", IPPROTO_UDP, 0x%x): %s", 284 ERR("getsockopt(" SOCKET_FMT ", IPPROTO_UDP, 0x%x): %s",
285 fd, option, eina_error_msg_get(efl_net_socket_error_get())); 285 fd, option, eina_error_msg_get(efl_net_socket_error_get()));
@@ -305,7 +305,7 @@ _efl_net_socket_udp_dont_route_set(Eo *o, Efl_Net_Socket_Udp_Data *pd, Eina_Bool
305 305
306 if (fd == INVALID_SOCKET) return EINA_TRUE; 306 if (fd == INVALID_SOCKET) return EINA_TRUE;
307 307
308 if (setsockopt(fd, SOL_SOCKET, SO_DONTROUTE, &value, sizeof(value)) != 0) 308 if (setsockopt(fd, SOL_SOCKET, SO_DONTROUTE, (const char *)&value, sizeof(value)) != 0)
309 { 309 {
310 Eina_Error err = efl_net_socket_error_get(); 310 Eina_Error err = efl_net_socket_error_get();
311 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE, %u): %s", fd, dont_route, eina_error_msg_get(err)); 311 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE, %u): %s", fd, dont_route, eina_error_msg_get(err));
@@ -333,7 +333,7 @@ _efl_net_socket_udp_dont_route_get(Eo *o, Efl_Net_Socket_Udp_Data *pd)
333 * elsewhere by nasty users. 333 * elsewhere by nasty users.
334 */ 334 */
335 valuelen = sizeof(value); 335 valuelen = sizeof(value);
336 if (getsockopt(fd, SOL_SOCKET, SO_DONTROUTE, &value, &valuelen) != 0) 336 if (getsockopt(fd, SOL_SOCKET, SO_DONTROUTE, (char *)&value, &valuelen) != 0)
337 { 337 {
338 Eina_Error err = efl_net_socket_error_get(); 338 Eina_Error err = efl_net_socket_error_get();
339 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE): %s", fd, eina_error_msg_get(err)); 339 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_DONTROUTE): %s", fd, eina_error_msg_get(err));
@@ -358,7 +358,7 @@ _efl_net_socket_udp_reuse_address_set(Eo *o, Efl_Net_Socket_Udp_Data *pd, Eina_B
358 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */ 358 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */
359 359
360 value = reuse_address; 360 value = reuse_address;
361 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &value, sizeof(value)) != 0) 361 if (setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (const char *)&value, sizeof(value)) != 0)
362 { 362 {
363 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR, %d): %s", 363 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR, %d): %s",
364 fd, value, eina_error_msg_get(efl_net_socket_error_get())); 364 fd, value, eina_error_msg_get(efl_net_socket_error_get()));
@@ -383,7 +383,7 @@ _efl_net_socket_udp_reuse_address_get(Eo *o, Efl_Net_Socket_Udp_Data *pd)
383 * elsewhere by nasty users. 383 * elsewhere by nasty users.
384 */ 384 */
385 valuelen = sizeof(value); 385 valuelen = sizeof(value);
386 if (getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &value, &valuelen) != 0) 386 if (getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, (char *)&value, &valuelen) != 0)
387 { 387 {
388 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR): %s", 388 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEADDR): %s",
389 fd, eina_error_msg_get(efl_net_socket_error_get())); 389 fd, eina_error_msg_get(efl_net_socket_error_get()));
@@ -410,7 +410,7 @@ _efl_net_socket_udp_reuse_port_set(Eo *o, Efl_Net_Socket_Udp_Data *pd, Eina_Bool
410 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */ 410 if (fd == INVALID_SOCKET) return EINA_TRUE; /* postpone until fd_set() */
411 411
412 value = reuse_port; 412 value = reuse_port;
413 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &value, sizeof(value)) != 0) 413 if (setsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (const char *)&value, sizeof(value)) != 0)
414 { 414 {
415 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEPORT, %d): %s", 415 ERR("setsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEPORT, %d): %s",
416 fd, value, eina_error_msg_get(efl_net_socket_error_get())); 416 fd, value, eina_error_msg_get(efl_net_socket_error_get()));
@@ -437,7 +437,7 @@ _efl_net_socket_udp_reuse_port_get(Eo *o, Efl_Net_Socket_Udp_Data *pd)
437 * elsewhere by nasty users. 437 * elsewhere by nasty users.
438 */ 438 */
439 valuelen = sizeof(value); 439 valuelen = sizeof(value);
440 if (getsockopt(fd, SOL_SOCKET, SO_REUSEPORT, &value, &valuelen) != 0) 440 if (getsockopt(fd, SOL_SOCKET, SO_REUSEPORT, (char *)&value, &valuelen) != 0)
441 { 441 {
442 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEPORT): %s", 442 ERR("getsockopt(" SOCKET_FMT ", SOL_SOCKET, SO_REUSEPORT): %s",
443 fd, eina_error_msg_get(efl_net_socket_error_get())); 443 fd, eina_error_msg_get(efl_net_socket_error_get()));