Skip to content

Commit c15b407

Browse files
committed
Fix tcp_channel_try_connect return types
1 parent d9c1094 commit c15b407

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/platform/posix/tcp_ip_channel.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ static lf_ret_t _try_connect(NetworkChannel *untyped_self) {
6969
self->client = new_socket;
7070
FD_SET(new_socket, &self->set);
7171

72-
return true;
72+
return LF_OK;
7373
}
7474

75-
return false;
75+
return LF_COULD_NOT_CONNECT;
7676
}
7777

7878
/* Client -> Connect */
@@ -231,7 +231,7 @@ static void _register_receive_callback(NetworkChannel *untyped_self,
231231
throw("pthread_attr_init failed");
232232
}
233233
/* TODO: RIOT posix-wrappers don't have pthread_attr_setstack yet */
234-
#ifdef PLATFORM_RIOT
234+
#if defined(PLATFORM_RIOT) && !defined(__USE_XOPEN2K)
235235
if (pthread_attr_setstackaddr(&self->receive_thread_attr, self->receive_thread_stack) != 0) {
236236
throw("pthread_attr_setstackaddr failed");
237237
}

0 commit comments

Comments
 (0)