Use the definition of struct mmsghdr if it is defined in build environment

mmsghrd structure type is defined locally in printmmsghdr function.

However, more functions will refer the definition in modifications for
supporting "-e write=set" and "-e read=set" option for sendmmsg and
recvmmsg system calls.

After this change, the system definition of struct mmsghdr will be used
if configure reports it is available, falling back to the old local
definition.

* configure.ac (AC_CHECK_TYPES): Add struct mmsghdr.
* net.c [!HAVE_STRUCT_MMSGHDR] (struct mmsghdr): Define.
(printmmsghdr): Use previously defined struct mmsghdr.

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
2 files changed