From 18c12da39ae390b2dbb91642500ddb7c84d39a0d Mon Sep 17 00:00:00 2001 From: Scott Severtson Date: Mon, 21 May 2012 10:44:02 -0400 Subject: [PATCH] Solaris 10 compatibility patch Solaris 10's version of netinet/ip.h doesn't include a definition for IPTOS_MINCOST, which results in the following build error: --- libtool: link: ( cd ".libs" && rm -f "liboping.la" && ln -s "../liboping.la" "liboping.la" ) gcc -DHAVE_CONFIG_H -I. -D_XPG4_2 -D__EXTENSIONS__ -Wall -Werror -g -O2 -c oping.c oping.c: In function `usage_qos_exit': oping.c:311: error: `IPTOS_MINCOST' undeclared (first use in this function) oping.c:311: error: (Each undeclared identifier is reported only once oping.c:311: error: for each function it appears in.) oping.c: In function `set_opt_send_qos': oping.c:389: error: `IPTOS_MINCOST' undeclared (first use in this function) gmake[3]: *** [oping.o] Error 1 --- I've attached a patch to define this value, consistent with how the Asterisk project resolved this issue: https://issues.asterisk.org/view.php?id=12050 The patch was developed against liboping 1.6.2; it doesn't appear there have been any changes in git since this release. Thanks, --Scott Severtson Signed-off-by: Florian Forster --- src/oping.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/oping.c b/src/oping.c index 79d7569..3cfe6d8 100644 --- a/src/oping.c +++ b/src/oping.c @@ -89,6 +89,10 @@ # define _POSIX_SAVED_IDS 0 #endif +#ifndef IPTOS_MINCOST +# define IPTOS_MINCOST 0x02 +#endif + /* Remove GNU specific __attribute__ settings when using another compiler */ #if !__GNUC__ # define __attribute__(x) /**/ -- 2.30.2