Skip to content

Commit 78810a8

Browse files
committed
Fix tcp_channel_try_connect return types
1 parent d19e97c commit 78810a8

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
@@ -73,10 +73,10 @@ static lf_ret_t _try_connect(NetworkChannel *untyped_self) {
7373
self->client = new_socket;
7474
FD_SET(new_socket, &self->set);
7575

76-
return true;
76+
return LF_OK;
7777
}
7878

79-
return false;
79+
return LF_COULD_NOT_CONNECT;
8080
}
8181

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

0 commit comments

Comments
 (0)