I found the fix in 2 hacks: 1. `MSG_CONFIRM` is not defined in socket.h on Solaris. I added an `#ifndef` line to define it at the beginning of check_icmp.c. There appears to be a section devoted to "sometimes undefined system macros" so that seems to be the right place for it. 2. `_XOPEN_SOURCE` needs to be defined to use the version of the msghdr struct that has "msg_control" and "msg_controllen". I don't know where the "standardized" place to put this would be. I just added a `check_icmp_CFLAGS = $(AM_CFLAGS) -D_XOPEN_SOURCE=500` to the plugins-root/Makefile.am. I didn't know what else might be affected by adding that definition, so I limited scope to just the file that needs it.
With these two fixes, I was able to compile on both 10 and 11. I also compiled on my CentOS 7 box and was able to build RPMs and run check_icmp without issue. -- Reply to this email on GitHub: https://github.com/monitoring-plugins/monitoring-plugins/issues/1317#issuecomment-68553876
