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

doombirdAD <[email protected]>
Newsgroups gmane.network.nagios.devel
Message-ID <monitoring-plugins/monitoring-plugins/issues/[email protected]>
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 directly or view it on GitHub:
https://github.com/monitoring-plugins/monitoring-plugins/issues/1317
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.