[icinga-checkins] icinga.org: icinga-core/mfriedrich/fixes: fix compilation error of SUN_LEN on Solaris

git at icinga.org git at icinga.org
Mon Jan 10 09:39:09 CET 2011


Module: icinga-core
Branch: mfriedrich/fixes
Commit: e5a0244131e42e7a07b169d1ded2b83cd1f1b729
URL:    https://git.icinga.org/?p=icinga-core.git;a=commit;h=e5a0244131e42e7a07b169d1ded2b83cd1f1b729

Author: Michael Friedrich <michael.friedrich at univie.ac.at>
Date:   Fri Jun 18 09:06:03 2010 +0200

fix compilation error of SUN_LEN on Solaris

---

 Changelog                       |    1 +
 module/idoutils/include/io.h    |    4 ++++
 module/idoutils/src/sockdebug.c |    1 +
 3 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/Changelog b/Changelog
index 09c5942..ac90ed0 100644
--- a/Changelog
+++ b/Changelog
@@ -96,6 +96,7 @@ FIXES
 * idoutils: modify string escaping again (mysql, pgsql), needs a full rewrite though
 * idoutils: fix for oracle when binding a NULL value on contactnotificationmethods
 * idoutils: completely renamed idoutils (s/ndo/ido/g etc), removing old sources
+* idoutils: fix compilation error of SUN_LEN on Solaris
 
 1.0.1 - 03/03/2010
 
diff --git a/module/idoutils/include/io.h b/module/idoutils/include/io.h
index 7024130..9cc297a 100644
--- a/module/idoutils/include/io.h
+++ b/module/idoutils/include/io.h
@@ -19,6 +19,10 @@
 
 #define IDO_DEFAULT_TCP_PORT  5668
 
+/* fix for sun os */
+#ifndef SUN_LEN
+#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen ((ptr)->sun_path))
+#endif
 
 /* MMAPFILE structure - used for reading files via mmap() */
 typedef struct ido_mmapfile_struct{
diff --git a/module/idoutils/src/sockdebug.c b/module/idoutils/src/sockdebug.c
index b6a36ad..f494a52 100644
--- a/module/idoutils/src/sockdebug.c
+++ b/module/idoutils/src/sockdebug.c
@@ -7,6 +7,7 @@
  **************************************************************/
 
 #include "../../../include/config.h"
+#include "../include/io.h"
 
 #define SOCKDEBUG_VERSION "1.0.1"
 #define SOCKDEBUG_NAME "SOCKDEBUG"





More information about the icinga-checkins mailing list