Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lib: UpdateHub: Missing new timeout API conversion #25230

Closed
nandojve opened this issue May 12, 2020 · 0 comments · Fixed by #25222
Closed

Lib: UpdateHub: Missing new timeout API conversion #25230

nandojve opened this issue May 12, 2020 · 0 comments · Fixed by #25222
Assignees
Labels
bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Milestone

Comments

@nandojve
Copy link
Member

Describe the bug
Missing new timeout api conversion.

To Reproduce
west build -b frdm_k64f samples/net/updatehub

Expected behavior
Build normally

Impact
Don't build

Screenshots or console output

obj   -c /home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c
In file included from ../include/kernel_includes.h:41,
                 from ../include/kernel.h:17,
                 from ../include/zephyr.h:18,
                 from /home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c:11:
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c: In function 'wait_fds':
../include/sys_clock.h:85:28: error: incompatible type for argument 3 of 'poll'
   85 | #define Z_TIMEOUT_TICKS(t) ((k_timeout_t) { .ticks = (t) })
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                            |
      |                            k_timeout_t {aka struct <anonymous>}
../include/sys_clock.h:87:25: note: in expansion of macro 'Z_TIMEOUT_TICKS'
   87 | #define Z_TIMEOUT_MS(t) Z_TIMEOUT_TICKS(k_ms_to_ticks_ceil32(MAX(t, 0)))
      |                         ^~~~~~~~~~~~~~~
../include/kernel.h:1585:24: note: in expansion of macro 'Z_TIMEOUT_MS'
 1585 | #define K_MSEC(ms)     Z_TIMEOUT_MS(ms)
      |                        ^~~~~~~~~~~~
../include/kernel.h:1597:24: note: in expansion of macro 'K_MSEC'
 1597 | #define K_SECONDS(s)   K_MSEC((s) * MSEC_PER_SEC)
      |                        ^~~~~~
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c:35:25: note: in expansion of macro 'K_SECONDS'
   35 | #define NETWORK_TIMEOUT K_SECONDS(2)
      |                         ^~~~~~~~~
/home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c:98:30: note: in expansion of macro 'NETWORK_TIMEOUT'
   98 |  if (poll(ctx.fds, ctx.nfds, NETWORK_TIMEOUT) < 0) {
      |                              ^~~~~~~~~~~~~~~
In file included from /home/gfbudke/zephyros/mainline/zephyr/lib/updatehub/updatehub.c:14:
../include/net/socket.h:651:64: note: expected 'int' but argument is of type 'k_timeout_t' {aka 'struct <anonymous>'}
  651 | static inline int poll(struct zsock_pollfd *fds, int nfds, int timeout)
      |                                                            ~~~~^~~~~~~
[129/189] Building C object zephyr/subsys/net/ip/CMakeFiles/subsys__net__ip.dir/net_if.c.obj
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/bin/cmake --build 

Environment (please complete the following information):

  • OS: Linux
  • Toolchain Zephyr SDK 0.11.2
  • Commit SHA ed2d263
@nandojve nandojve added the bug The issue is a bug, or the PR is fixing a bug label May 12, 2020
@nandojve nandojve added this to the v2.3.0 milestone May 12, 2020
@nandojve nandojve self-assigned this May 12, 2020
@nandojve nandojve linked a pull request May 12, 2020 that will close this issue
nandojve added a commit to UpdateHub/zephyr that referenced this issue May 12, 2020
Update to new timeout api. Without this change UpdateHub don't build
anymore.

Fixes: zephyrproject-rtos#25230

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
@carlescufi carlescufi added priority: high High impact/importance bug priority: medium Medium impact/importance bug and removed priority: medium Medium impact/importance bug labels May 12, 2020
carlescufi pushed a commit that referenced this issue May 12, 2020
Update to new timeout api. Without this change UpdateHub don't build
anymore.

Fixes: #25230

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
hakehuang pushed a commit to hakehuang/zephyr that referenced this issue Jun 20, 2020
Update to new timeout api. Without this change UpdateHub don't build
anymore.

Fixes: zephyrproject-rtos#25230

Signed-off-by: Gerson Fernando Budke <gerson.budke@ossystems.com.br>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug, or the PR is fixing a bug priority: high High impact/importance bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants