<p>I found the fix in 2 hacks:</p>

<ol class="task-list">
<li>
<code>MSG_CONFIRM</code> is not defined in socket.h on Solaris.  I added an <code>#ifndef</code> 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.</li>
<li>
<code>_XOPEN_SOURCE</code> 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 <code>check_icmp_CFLAGS = $(AM_CFLAGS) -D_XOPEN_SOURCE=500</code> 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.</li>
</ol>

<p>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.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br><a href="https://github.com/monitoring-plugins/monitoring-plugins/issues/1317#issuecomment-68553876">Reply to this email on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AFQl2UVbGdJvVdN9ep0UB2OiGbyElSOGks5ndue3gaJpZM4DNisn.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/monitoring-plugins/monitoring-plugins/issues/1317#issuecomment-68553876"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>