Skip to content

Commit bddbb46

Browse files
committed
Remove warnings by refactoring tfd logic
Signed-off-by: Krisztian Szilvasi <34309983+kr-t@users.noreply.github.com>
1 parent 7639ed9 commit bddbb46

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

  • core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src

core/iwasm/libraries/libc-wasi/sandboxed-system-primitives/src/posix.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2212,14 +2212,14 @@ wasmtime_ssp_poll_oneoff(wasm_exec_env_t exec_env, struct fd_table *curfds,
22122212
if (error == 0) {
22132213

22142214
// Temporary workaround (see PR#4377)
2215-
#ifdef BH_PLATFORM_ZEPHYR
2216-
os_file_handle tfd = fos[i]->file_handle->fd;
2217-
#else
22182215
os_file_handle tfd = fos[i]->file_handle;
2219-
#endif
22202216
// Proper file descriptor on which we can poll().
22212217
pfds[i] = (os_poll_file_handle){
2218+
#ifdef BH_PLATFORM_ZEPHYR
2219+
.fd = tfd->fd,
2220+
#else
22222221
.fd = tfd,
2222+
#endif
22232223
.events = s->u.type == __WASI_EVENTTYPE_FD_READ
22242224
? POLLIN
22252225
: POLLOUT,

0 commit comments

Comments
 (0)