check_icmp is missing -D_XPG4_2 on Solaris
eponymous alias <[email protected]>
| Newsgroups | gmane.network.nagios.devel |
|---|---|
| Message-ID | <1425939279.53508.YahooMailBasic__96.5699706741319$1425939478$gmane$org@web160705.mail.bf1.yahoo.com> |
The following is being reported against monitoring-plugins-v2.1.1-39-g8095.
In the compilation of plugins-root/check_icmp.c on Solaris 8, I get:
"check_icmp.c", line 948: undefined struct/union member: msg_control
"check_icmp.c", line 948: warning: improper pointer/integer combination: op "="
"check_icmp.c", line 949: undefined struct/union member: msg_controllen
cc: acomp failed for check_icmp.c
*** Error code 2
make: Fatal error: Command failed for target `check_icmp.o'
because struct msghdr is defined in /usr/include/sys/socket.h with
these protections around the affected fields within the structure:
#if defined(_XPG4_2) || defined(_KERNEL)
void *msg_control; /* ancillary data */
socklen_t msg_controllen; /* ancillary data buffer len */
int msg_flags; /* flags on received message */
#else
caddr_t msg_accrights; /* access rights sent/received */
int msg_accrightslen;
#endif /* defined(_XPG4_2) || defined(_KERNEL) */
and the check_icmp.c code is referencing the msg_control and
msg_controllen fields. Clearly, _XPG4_2 needs to be defined automatically
for this compilation, when the Makefile is built in the plugins-root
directory for Solaris.