socklen_t err_size = sizeof(err);
if (getsockopt(rpc->fd, SOL_SOCKET, SO_ERROR,
- &err, &err_size) != 0 || err != 0) {
+ (char *)&err, &err_size) != 0 || err != 0) {
if (err == 0) {
err = errno;
}
socklen_t err_size = sizeof(err);
if (getsockopt(rpc->fd, SOL_SOCKET, SO_ERROR,
- &err, &err_size) != 0 || err != 0) {
+ (char *)&err, &err_size) != 0 || err != 0) {
if (err == 0) {
err = errno;
}
freeaddrinfo(ai);
rpc->is_broadcast = is_broadcast;
- setsockopt(rpc->fd, SOL_SOCKET, SO_BROADCAST, &is_broadcast, sizeof(is_broadcast));
+ setsockopt(rpc->fd, SOL_SOCKET, SO_BROADCAST, (char *)&is_broadcast, sizeof(is_broadcast));
return 0;
}