check_icmp fails to compile on Solaris 10 and 11 (#1317)

eponymous alias eponymousalias at yahoo.com
Thu Jan 1 01:28:22 CET 2015


MSG_CONFIRM seems to be a Linux-ism, and not a historical one at that.
The sendmsg(2) man page says:

       MSG_CONFIRM (Linux 2.3+ only)
              Tell the link layer that forward progress happened: you  got  a  suc-
              cessful reply from the other side. If the link layer doesn't get this
              it will regularly reprobe the neighbour (e.g.  via  a  unicast  ARP).
              Only  valid  on  SOCK_DGRAM  and  SOCK_RAW sockets and currently only
              implemented for IPv4 and IPv6. See arp(7) for details.

So I wouldn't blame Oracle for this.  (There is no MSG_CONFIRM symbol
defined in the Solaris /usr/include/sys/socket.h header.)  The OpenGroup
year-2013 page on sendmsg() doesn't mention it, either:

http://pubs.opengroup.org/onlinepubs/9699919799/functions/sendmsg.html

The construction around this line in plugins-root/check_icmp.c:

   883		len = sendmsg(sock, &hdr, MSG_CONFIRM);

will need to change to make the code portable to other platforms.

--------------------------------------------
On Wed, 12/31/14, doombirdAD <notifications at github.com> wrote:

 Subject: check_icmp fails to compile on Solaris 10 and 11 (#1317)
 To: "Monitoring Plugins Development" <devel at monitoring-plugins.org>
 Date: Wednesday, December 31, 2014, 11:52 AM
 
 We're trying to update our
 monitoring in our mostly Solaris 10 and 11 environment, but
 I started getting errors compiling check_icmp in the most
 recent version.  I suspect it's an issue between glibc
 and Oracle's libc.
 
 From Solaris 10:
 
 gcc
 -DLOCALEDIR=\"/usr/local/share/locale\"
 -DHAVE_CONFIG_H -I. -I..  -I.. -I../lib -I../gl -I../intl
 -I../plugins -I/include  -D_REENTRANT -I/include
 -DNP_VERSION='"2.1.1"' -g -O2 -MT
 check_icmp.o -MD -MP -MF .deps/check_icmp.Tpo -c -o
 check_icmp.o check_icmp.c
 check_icmp.c: In function `send_icmp_ping':
 check_icmp.c:883: error: `MSG_CONFIRM' undeclared (first
 use in this function)
 check_icmp.c:883: error: (Each undeclared identifier is
 reported only once
 check_icmp.c:883: error: for each function it appears in.)
 check_icmp.c: In function `recvfrom_wto':
 check_icmp.c:943: error: structure has no member named
 `msg_control'
 check_icmp.c:944: error: structure has no member named
 `msg_controllen'
 *** Error code 1
 make: Fatal error: Command failed for target
 `check_icmp.o'
 
 
 Also errors when compiling from Solaris 11:
 
 gcc
 -DLOCALEDIR=\"/usr/local/share/locale\"
 -DHAVE_CONFIG_H -I. -I..  -I.. -I../lib -I../gl -I../intl
 -I../plugins -I/usr/include  -D_REENTRANT
 -DNP_VERSION='"2.1.1"' -g -O2 -MT
 check_icmp.o -MD -MP -MF .deps/check_icmp.Tpo -c -o
 check_icmp.o check_icmp.c
 check_icmp.c: In function ‘send_icmp_ping’:
 check_icmp.c:883:28: error: ‘MSG_CONFIRM’ undeclared
 (first use in this function)
 check_icmp.c:883:28: note: each undeclared identifier is
 reported only once for each function it appears in
 check_icmp.c: In function ‘recvfrom_wto’:
 check_icmp.c:943:5: error: ‘struct msghdr’ has no member
 named ‘msg_control’
 check_icmp.c:944:5: error: ‘struct msghdr’ has no member
 named ‘msg_controllen’
 check_icmp.c:948:11: warning: assignment makes pointer from
 integer without a cast
 check_icmp.c:948:45: warning: assignment makes pointer from
 integer without a cast
 check_icmp.c:952:4: warning: passing argument 2 of
 ‘memcpy’ makes pointer from integer without a cast
 /usr/include/iso/string_iso.h:54:14: note: expected ‘const
 void *’ but argument is of type ‘int’
 *** Error code 1
 make: Fatal error: Command failed for target
 `check_icmp.o'
 
 
 —
 Reply
 to this email on GitHub.
 
   
     
     
   
   
 
 



More information about the Devel mailing list