From f11d29e2ca0e57cbea7e1a460bd8b48d87365623 Mon Sep 17 00:00:00 2001 From: Patrik Stridvall Date: Wed, 10 Nov 1999 20:21:37 +0000 Subject: [PATCH] Solaris compile fixes. --- dlls/icmp/icmp_main.c | 36 +++++++++++++++++++++++++----------- 1 file changed, 25 insertions(+), 11 deletions(-) diff --git a/dlls/icmp/icmp_main.c b/dlls/icmp/icmp_main.c index 93e20ea0821..3fd43c18ff7 100644 --- a/dlls/icmp/icmp_main.c +++ b/dlls/icmp/icmp_main.c @@ -19,13 +19,17 @@ * - Using the winsock functions has not been tested. */ +#include "config.h" -#define __USE_BSD - -#include +#include +#ifdef HAVE_SYS_SOCKET_H +# include +#endif #include #include -#include +#ifdef HAVE_NETINET_IN_H +# include +#endif #include #include #include @@ -33,7 +37,9 @@ #include #include #include -#include +#ifdef HAVE_ARPA_INET_H +# include +#endif #include "windef.h" #include "winbase.h" @@ -221,19 +227,19 @@ DWORD WINAPI IcmpSendEcho( int len; /* Before we mess with the options, get the default values */ len=sizeof(val); - ISOCK_getsockopt(icp->sid,SOL_IP,IP_TTL,&val,&len); + ISOCK_getsockopt(icp->sid,IPPROTO_IP,IP_TTL,(char *)&val,&len); icp->default_opts.Ttl=val; len=sizeof(val); - ISOCK_getsockopt(icp->sid,SOL_IP,IP_TOS,&val,&len); + ISOCK_getsockopt(icp->sid,IPPROTO_IP,IP_TOS,(char *)&val,&len); icp->default_opts.Tos=val; /* FIXME: missing: handling of IP 'flags', and all the other options */ } val=RequestOptions->Ttl; - ISOCK_setsockopt(icp->sid,SOL_IP,IP_TTL,&val,sizeof(val)); + ISOCK_setsockopt(icp->sid,IPPROTO_IP,IP_TTL,(char *)&val,sizeof(val)); val=RequestOptions->Tos; - ISOCK_setsockopt(icp->sid,SOL_IP,IP_TOS,&val,sizeof(val)); + ISOCK_setsockopt(icp->sid,IPPROTO_IP,IP_TOS,(char *)&val,sizeof(val)); /* FIXME: missing: handling of IP 'flags', and all the other options */ icp->default_opts.OptionsSize=IP_OPTS_CUSTOM; @@ -242,9 +248,9 @@ DWORD WINAPI IcmpSendEcho( /* Restore the default options */ val=icp->default_opts.Ttl; - ISOCK_setsockopt(icp->sid,SOL_IP,IP_TTL,&val,sizeof(val)); + ISOCK_setsockopt(icp->sid,IPPROTO_IP,IP_TTL,(char *)&val,sizeof(val)); val=icp->default_opts.Tos; - ISOCK_setsockopt(icp->sid,SOL_IP,IP_TOS,&val,sizeof(val)); + ISOCK_setsockopt(icp->sid,IPPROTO_IP,IP_TOS,(char *)&val,sizeof(val)); /* FIXME: missing: handling of IP 'flags', and all the other options */ icp->default_opts.OptionsSize=IP_OPTS_DEFAULT; @@ -319,10 +325,18 @@ DWORD WINAPI IcmpSendEcho( case ICMP_UNREACH: switch (icmp_header->icmp_code) { case ICMP_UNREACH_HOST: +#ifdef ICMP_UNREACH_HOST_UNKNOWN case ICMP_UNREACH_HOST_UNKNOWN: +#endif +#ifdef ICMP_UNREACH_ISOLATED case ICMP_UNREACH_ISOLATED: +#endif +#ifdef ICMP_UNREACH_HOST_PROHIB case ICMP_UNREACH_HOST_PROHIB: +#endif +#ifdef ICMP_UNREACH_TOSHOST case ICMP_UNREACH_TOSHOST: +#endif ier->Status=IP_DEST_HOST_UNREACHABLE; break; case ICMP_UNREACH_PORT: