]> granicus.if.org Git - strace/commit
tests/inet-cmsg.c: fix musl libc compilation warnings
authorDmitry V. Levin <ldv@altlinux.org>
Tue, 12 Jan 2016 00:00:47 +0000 (00:00 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Tue, 12 Jan 2016 00:00:47 +0000 (00:00 +0000)
commit4776e3366f7e57c83fb1c275f601291b84e5d63e
tree670d9960cb34845aee68086b75c3c3dbe9bafe67
parentc36270a28eefe68ada32323e9ab4bcea4c27007c
tests/inet-cmsg.c: fix musl libc compilation warnings

The types that are used to define msg_namelen member of struct msghdr
and cmsg_len member of struct cmsghdr differ between libcs.
For example, glibc defines them as size_t, while musl libc - as type
socklen_t.  Print these fields using %lu format to avoid issues caused
by libc differences.

* tests/inet-cmsg.c (main): Cast mh.msg_controllen and c->cmsg_len
to unsigned long and print them using %lu format.
tests/inet-cmsg.c