On Mon, Nov 17, 2025 at 09:38:33PM +0100, Philippe Mathieu-Daudé wrote:
> Commit 44ce1b5d2fc ("migration/rdma: define htonll/ntohll
> only if not predefined") tried to only include htonll/ntohll
> replacements when their symbol is *defined*, but this doesn't
> work, as they aren't:
> 
>   ../migration/rdma.c:242:17: error: static declaration of 'htonll' follows 
> non-static declaration
>     242 | static uint64_t htonll(uint64_t v)
>         |                 ^~~~~~
>   In file included from /usr/include/netinet/in.h:73,
>                    from /usr/include/sys/socket.h:32,
>                    from /home/f4bug/qemu/include/system/os-posix.h:30,
>                    from /home/f4bug/qemu/include/qemu/osdep.h:176,
>                    from ../migration/rdma.c:17:
>   /usr/include/sys/byteorder.h:75:18: note: previous declaration of 'htonll' 
> with type 'uint64_t(uint64_t)' {aka 'long unsigned int(long unsigned int)'}
>      75 | extern  uint64_t htonll(uint64_t);
>         |                  ^~~~~~
>   ../migration/rdma.c:252:17: error: static declaration of 'ntohll' follows 
> non-static declaration
>     252 | static uint64_t ntohll(uint64_t v)
>         |                 ^~~~~~
>   /usr/include/sys/byteorder.h:76:18: note: previous declaration of 'ntohll' 
> with type 'uint64_t(uint64_t)' {aka 'long unsigned int(long unsigned int)'}
>      76 | extern  uint64_t ntohll(uint64_t);
>         |                  ^~~~~~
> 
> Better to check the symbol availability with meson.
> 
> Signed-off-by: Philippe Mathieu-Daudé <[email protected]>

Acked-by: Peter Xu <[email protected]>

-- 
Peter Xu


Reply via email to