summaryrefslogtreecommitdiff
path: root/net/nagios-base
diff options
context:
space:
mode:
authorrodent <rodent@pkgsrc.org>2015-04-12 23:33:06 +0000
committerrodent <rodent@pkgsrc.org>2015-04-12 23:33:06 +0000
commit171ea7b43297c8bd3fdd18c44638360f6748f1ae (patch)
tree1d8c346547194b9e4818759dff05298136559309 /net/nagios-base
parent468fbdc62cf1e6b39edd56c0fc5393254e164305 (diff)
downloadpkgsrc-171ea7b43297c8bd3fdd18c44638360f6748f1ae.tar.gz
Fix build on SunOS. What a pain.
Diffstat (limited to 'net/nagios-base')
-rw-r--r--net/nagios-base/Makefile5
-rw-r--r--net/nagios-base/distinfo12
-rw-r--r--net/nagios-base/patches/patch-cgi_cmd.c15
-rw-r--r--net/nagios-base/patches/patch-cgi_extinfo.c24
-rw-r--r--net/nagios-base/patches/patch-cgi_statusjson.c78
-rw-r--r--net/nagios-base/patches/patch-common_comments.c223
-rw-r--r--net/nagios-base/patches/patch-include_comments.h58
-rw-r--r--net/nagios-base/patches/patch-include_statusjson.h26
-rw-r--r--net/nagios-base/patches/patch-t-tap_test__xsddefault.c24
-rw-r--r--net/nagios-base/patches/patch-xdata_xcddefault.c15
-rw-r--r--net/nagios-base/patches/patch-xdata_xrddefault.c15
-rw-r--r--net/nagios-base/patches/patch-xdata_xsddefault.c15
12 files changed, 508 insertions, 2 deletions
diff --git a/net/nagios-base/Makefile b/net/nagios-base/Makefile
index c0155f79e37..d692c248cb9 100644
--- a/net/nagios-base/Makefile
+++ b/net/nagios-base/Makefile
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.56 2015/04/03 17:06:08 rodent Exp $
+# $NetBSD: Makefile,v 1.57 2015/04/12 23:33:06 rodent Exp $
#
DISTNAME= nagios-4.0.8
@@ -94,6 +94,9 @@ post-install:
${DESTDIR}/${PREFIX}/share/nagios/images/logos/
${INSTALL_DATA} ${WRKDIR}/netbsd40.png \
${DESTDIR}/${PREFIX}/share/nagios/images/logos/
+ ${CHMOD} g-w ${DESTDIR}${PREFIX}/share/nagios/jsonquery.html
+ ${CHMOD} g-w ${DESTDIR}${PREFIX}/share/nagios/rss-corefeed.html
+ ${CHMOD} g-w ${DESTDIR}${PREFIX}/share/nagios/rss-newsfeed.html
.include "../../mk/dlopen.buildlink3.mk"
.include "../../devel/libltdl/buildlink3.mk"
diff --git a/net/nagios-base/distinfo b/net/nagios-base/distinfo
index ee87a8fc251..8d9a60ecf46 100644
--- a/net/nagios-base/distinfo
+++ b/net/nagios-base/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.23 2015/04/08 23:25:25 rodent Exp $
+$NetBSD: distinfo,v 1.24 2015/04/12 23:33:06 rodent Exp $
SHA1 (nagios-4.0.8.tar.gz) = d49586db6905a8e58a082251d8f89ef5c2cab872
RMD160 (nagios-4.0.8.tar.gz) = b53631755e0a23aba918a99f58b7bea237fdd799
@@ -9,11 +9,21 @@ Size (nagios-netbsd40-icons.tar.gz) = 5659 bytes
SHA1 (patch-Makefile.in) = 953eea6b276beba75ab5c64c14d10cdcf1ca2188
SHA1 (patch-base_Makefile.in) = 2b0162bb4d395b1d529f5fc1fdf9eab3ddaeb161
SHA1 (patch-cgi_Makefile.in) = 25c22914986c0b781f5dd665a7a53778e1031a63
+SHA1 (patch-cgi_cmd.c) = 90dfbfc78b08c5d72f168003d6c9fb56d67a8743
+SHA1 (patch-cgi_extinfo.c) = 8cad0787fbe0a782edb93ca299462a5718a34a4b
SHA1 (patch-cgi_getcgi.c) = 3af474de4f4281f18a306f7d618ff532d0a9ca9e
+SHA1 (patch-cgi_statusjson.c) = 13967c18ee3eaaaf75edb8b3ee028bece73272ae
SHA1 (patch-common_Makefile.in) = 7fa093a6109dfa03f9b97e4312d3a09e3235f00f
+SHA1 (patch-common_comments.c) = 7739c9c74333c45e86242383073dfa78785445ec
SHA1 (patch-configure) = f57db3a43c1abc1aa0d6fe007308089c620624a4
SHA1 (patch-daemon-init.in) = 1e50bb84fde9780d5b13edb4e232c0e3a90ac3f4
SHA1 (patch-html_Makefile.in) = 33ca19b5cf37839be6fbd851a5dcf29d4d701c8b
+SHA1 (patch-include_comments.h) = c86328a4f1437ee1dc2b6f97be61693414dd4fce
SHA1 (patch-include_locations.h.in) = 0ee376f6737b24f0d4ea8b37781aca70147c5e70
+SHA1 (patch-include_statusjson.h) = c5a84b9ef3114f2e2480d719bbb4a24c8965e052
SHA1 (patch-lib_runcmd.c) = fb34fe5cdc39aca973c1a6e125b125867e6ed262
SHA1 (patch-sample-config_nagios.cfg.in) = 4ad00840ad66d2e01b19c6db76c810fc3fb80795
+SHA1 (patch-t-tap_test__xsddefault.c) = db7166fae411a461d8b4a4a31f55af693aeb03b0
+SHA1 (patch-xdata_xcddefault.c) = ba14af868cd773d07e029a2773a44614eedc3e46
+SHA1 (patch-xdata_xrddefault.c) = 0883a8ea4bac21523b0aa6ef77272ba5ae0c8b42
+SHA1 (patch-xdata_xsddefault.c) = 6255158bfe90a390678f2b834935e809b21d560c
diff --git a/net/nagios-base/patches/patch-cgi_cmd.c b/net/nagios-base/patches/patch-cgi_cmd.c
new file mode 100644
index 00000000000..1905778f0ea
--- /dev/null
+++ b/net/nagios-base/patches/patch-cgi_cmd.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-cgi_cmd.c,v 1.4 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- cgi/cmd.c.orig 2014-08-12 15:00:01.000000000 +0000
++++ cgi/cmd.c
+@@ -1403,7 +1403,7 @@ void commit_command_data(int cmd) {
+ service *temp_service;
+ host *temp_host;
+ hostgroup *temp_hostgroup;
+- comment *temp_comment;
++ my_comment *temp_comment;
+ scheduled_downtime *temp_downtime;
+ servicegroup *temp_servicegroup = NULL;
+ contact *temp_contact = NULL;
diff --git a/net/nagios-base/patches/patch-cgi_extinfo.c b/net/nagios-base/patches/patch-cgi_extinfo.c
new file mode 100644
index 00000000000..74937e93bcf
--- /dev/null
+++ b/net/nagios-base/patches/patch-cgi_extinfo.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-cgi_extinfo.c,v 1.3 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- cgi/extinfo.c.orig 2014-08-12 15:00:01.000000000 +0000
++++ cgi/extinfo.c
+@@ -1739,7 +1739,7 @@ void show_all_comments(void) {
+ const char *bg_class = "";
+ int odd = 0;
+ char date_time[MAX_DATETIME_LENGTH];
+- comment *temp_comment;
++ my_comment *temp_comment;
+ host *temp_host;
+ service *temp_service;
+ char *comment_type;
+@@ -2420,7 +2420,7 @@ void display_comments(int type) {
+ const char *bg_class = "";
+ int odd = 1;
+ char date_time[MAX_DATETIME_LENGTH];
+- comment *temp_comment;
++ my_comment *temp_comment;
+ char *comment_type;
+ char expire_time[MAX_DATETIME_LENGTH];
+
diff --git a/net/nagios-base/patches/patch-cgi_statusjson.c b/net/nagios-base/patches/patch-cgi_statusjson.c
new file mode 100644
index 00000000000..f7d7605a414
--- /dev/null
+++ b/net/nagios-base/patches/patch-cgi_statusjson.c
@@ -0,0 +1,78 @@
+$NetBSD: patch-cgi_statusjson.c,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- cgi/statusjson.c.orig 2014-08-12 15:00:01.000000000 +0000
++++ cgi/statusjson.c
+@@ -63,7 +63,7 @@ extern service *service_list;
+ extern contact *contact_list;
+ #endif
+ extern servicestatus *servicestatus_list;
+-extern comment *comment_list;
++extern my_comment *comment_list;
+ extern scheduled_downtime *scheduled_downtime_list;
+
+ /* Program status variables */
+@@ -717,7 +717,7 @@ json_object *json_status_service_selecto
+ time_t, time_t, char *, char *, char *, contactgroup *, timeperiod *,
+ timeperiod *, command *, command *);
+
+-int json_status_comment_passes_selection(comment *, int, time_t, time_t,
++int json_status_comment_passes_selection(my_comment *, int, time_t, time_t,
+ unsigned, unsigned, unsigned, unsigned, char *, char *);
+ json_object *json_status_comment_selectors(unsigned, int, int, int, time_t,
+ time_t, unsigned, unsigned, unsigned, unsigned, char *, char *);
+@@ -1824,7 +1824,7 @@ int validate_arguments(json_object *json
+ timeperiod *temp_timeperiod = NULL;
+ command *temp_command = NULL;
+ contact *temp_contact = NULL;
+- comment *temp_comment = NULL;
++ my_comment *temp_comment = NULL;
+ scheduled_downtime *temp_downtime = NULL;
+ authdata *authinfo = NULL; /* Currently always NULL because
+ get_authentication_information() hasn't
+@@ -3568,7 +3568,7 @@ void json_status_service_details(json_ob
+ #endif
+ }
+
+-int json_status_comment_passes_selection(comment *temp_comment, int time_field,
++int json_status_comment_passes_selection(my_comment *temp_comment, int time_field,
+ time_t start_time, time_t end_time, unsigned comment_types,
+ unsigned entry_types, unsigned persistence, unsigned expiring,
+ char *host_name, char *service_description) {
+@@ -3743,7 +3743,7 @@ json_object *json_status_commentcount(un
+ char *host_name, char *service_description) {
+
+ json_object *json_data;
+- comment *temp_comment;
++ my_comment *temp_comment;
+ int count = 0;
+
+ json_data = json_new_object();
+@@ -3777,7 +3777,7 @@ json_object *json_status_commentlist(uns
+ json_object *json_commentlist_object = NULL;
+ json_object *json_commentlist_array = NULL;
+ json_object *json_comment_details;
+- comment *temp_comment;
++ my_comment *temp_comment;
+ int current = 0;
+ int counted = 0;
+ char *buf;
+@@ -3835,7 +3835,7 @@ json_object *json_status_commentlist(uns
+ return json_data;
+ }
+
+-json_object *json_status_comment(unsigned format_options, comment *temp_comment) {
++json_object *json_status_comment(unsigned format_options, my_comment *temp_comment) {
+
+ json_object *json_comment = json_new_object();
+ json_object *json_details = json_new_object();
+@@ -3849,7 +3849,7 @@ json_object *json_status_comment(unsigne
+ }
+
+ void json_status_comment_details(json_object *json_details,
+- unsigned format_options, comment *temp_comment) {
++ unsigned format_options, my_comment *temp_comment) {
+
+ json_object_append_integer(json_details, "comment_id",
+ temp_comment->comment_id);
diff --git a/net/nagios-base/patches/patch-common_comments.c b/net/nagios-base/patches/patch-common_comments.c
new file mode 100644
index 00000000000..27a3145bbeb
--- /dev/null
+++ b/net/nagios-base/patches/patch-common_comments.c
@@ -0,0 +1,223 @@
+$NetBSD: patch-common_comments.c,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- common/comments.c.orig 2014-08-12 15:00:01.000000000 +0000
++++ common/comments.c
+@@ -36,9 +36,9 @@
+ #endif
+
+
+-comment *comment_list = NULL;
++my_comment *comment_list = NULL;
+ int defer_comment_sorting = 0;
+-comment **comment_hashlist = NULL;
++my_comment **comment_hashlist = NULL;
+
+
+
+@@ -131,12 +131,12 @@ int add_new_service_comment(int entry_ty
+
+ /* deletes a host or service comment */
+ int delete_comment(int type, unsigned long comment_id) {
+- comment *this_comment = NULL;
+- comment *last_comment = NULL;
+- comment *next_comment = NULL;
++ my_comment *this_comment = NULL;
++ my_comment *last_comment = NULL;
++ my_comment *next_comment = NULL;
+ int hashslot = 0;
+- comment *this_hash = NULL;
+- comment *last_hash = NULL;
++ my_comment *this_hash = NULL;
++ my_comment *last_hash = NULL;
+
+ /* find the comment we should remove */
+ for(this_comment = comment_list, last_comment = comment_list; this_comment != NULL; this_comment = next_comment) {
+@@ -232,8 +232,8 @@ int delete_all_comments(int type, char *
+ /* deletes all comments for a particular host */
+ int delete_all_host_comments(char *host_name) {
+ int result = OK;
+- comment *temp_comment = NULL;
+- comment *next_comment = NULL;
++ my_comment *temp_comment = NULL;
++ my_comment *next_comment = NULL;
+
+ if(host_name == NULL)
+ return ERROR;
+@@ -252,8 +252,8 @@ int delete_all_host_comments(char *host_
+ /* deletes all non-persistent acknowledgement comments for a particular host */
+ int delete_host_acknowledgement_comments(host *hst) {
+ int result = OK;
+- comment *temp_comment = NULL;
+- comment *next_comment = NULL;
++ my_comment *temp_comment = NULL;
++ my_comment *next_comment = NULL;
+
+ if(hst == NULL)
+ return ERROR;
+@@ -275,8 +275,8 @@ int delete_host_acknowledgement_comments
+ /* deletes all comments for a particular service */
+ int delete_all_service_comments(char *host_name, char *svc_description) {
+ int result = OK;
+- comment *temp_comment = NULL;
+- comment *next_comment = NULL;
++ my_comment *temp_comment = NULL;
++ my_comment *next_comment = NULL;
+
+ if(host_name == NULL || svc_description == NULL)
+ return ERROR;
+@@ -295,8 +295,8 @@ int delete_all_service_comments(char *ho
+ /* deletes all non-persistent acknowledgement comments for a particular service */
+ int delete_service_acknowledgement_comments(service *svc) {
+ int result = OK;
+- comment *temp_comment = NULL;
+- comment *next_comment = NULL;
++ my_comment *temp_comment = NULL;
++ my_comment *next_comment = NULL;
+
+ if(svc == NULL)
+ return ERROR;
+@@ -314,7 +314,7 @@ int delete_service_acknowledgement_comme
+
+ /* checks for an expired comment (and removes it) */
+ int check_for_expired_comment(unsigned long comment_id) {
+- comment *temp_comment = NULL;
++ my_comment *temp_comment = NULL;
+
+ /* check all comments */
+ for(temp_comment = comment_list; temp_comment != NULL; temp_comment = temp_comment->next) {
+@@ -341,16 +341,16 @@ int check_for_expired_comment(unsigned l
+ /******************************************************************/
+
+ /* adds comment to hash list in memory */
+-int add_comment_to_hashlist(comment *new_comment) {
+- comment *temp_comment = NULL;
+- comment *lastpointer = NULL;
++int add_comment_to_hashlist(my_comment *new_comment) {
++ my_comment *temp_comment = NULL;
++ my_comment *lastpointer = NULL;
+ int hashslot = 0;
+
+ /* initialize hash list */
+ if(comment_hashlist == NULL) {
+ int i;
+
+- comment_hashlist = (comment **)malloc(sizeof(comment *) * COMMENT_HASHSLOTS);
++ comment_hashlist = (my_comment **)malloc(sizeof(my_comment *) * COMMENT_HASHSLOTS);
+ if(comment_hashlist == NULL)
+ return 0;
+
+@@ -410,9 +410,9 @@ int add_service_comment(int entry_type,
+
+ /* adds a comment to the list in memory */
+ int add_comment(int comment_type, int entry_type, char *host_name, char *svc_description, time_t entry_time, char *author, char *comment_data, unsigned long comment_id, int persistent, int expires, time_t expire_time, int source) {
+- comment *new_comment = NULL;
+- comment *last_comment = NULL;
+- comment *temp_comment = NULL;
++ my_comment *new_comment = NULL;
++ my_comment *last_comment = NULL;
++ my_comment *temp_comment = NULL;
+ int result = OK;
+
+ /* make sure we have the data we need */
+@@ -420,7 +420,7 @@ int add_comment(int comment_type, int en
+ return ERROR;
+
+ /* allocate memory for the comment */
+- if((new_comment = (comment *)calloc(1, sizeof(comment))) == NULL)
++ if((new_comment = (my_comment *)calloc(1, sizeof(my_comment))) == NULL)
+ return ERROR;
+
+ /* duplicate vars */
+@@ -500,13 +500,13 @@ int add_comment(int comment_type, int en
+ }
+
+ static int comment_compar(const void *p1, const void *p2) {
+- comment *c1 = *(comment **)p1;
+- comment *c2 = *(comment **)p2;
++ my_comment *c1 = *(my_comment **)p1;
++ my_comment *c2 = *(my_comment **)p2;
+ return c1->comment_id - c2->comment_id;
+ }
+
+ int sort_comments(void) {
+- comment **array, *temp_comment;
++ my_comment **array, *temp_comment;
+ unsigned long i = 0, unsorted_comments = 0;
+
+ if(!defer_comment_sorting)
+@@ -546,8 +546,8 @@ int sort_comments(void) {
+
+ /* frees memory allocated for the comment data */
+ void free_comment_data(void) {
+- comment *this_comment = NULL;
+- comment *next_comment = NULL;
++ my_comment *this_comment = NULL;
++ my_comment *next_comment = NULL;
+
+ /* free memory for the comment list */
+ for(this_comment = comment_list; this_comment != NULL; this_comment = next_comment) {
+@@ -576,7 +576,7 @@ void free_comment_data(void) {
+
+ /* get the number of comments associated with a particular host */
+ int number_of_host_comments(char *host_name) {
+- comment *temp_comment = NULL;
++ my_comment *temp_comment = NULL;
+ int total_comments = 0;
+
+ if(host_name == NULL)
+@@ -593,7 +593,7 @@ int number_of_host_comments(char *host_n
+
+ /* get the number of comments associated with a particular service */
+ int number_of_service_comments(char *host_name, char *svc_description) {
+- comment *temp_comment = NULL;
++ my_comment *temp_comment = NULL;
+ int total_comments = 0;
+
+ if(host_name == NULL || svc_description == NULL)
+@@ -613,14 +613,14 @@ int number_of_service_comments(char *hos
+ /********************* TRAVERSAL FUNCTIONS ************************/
+ /******************************************************************/
+
+-comment *get_first_comment_by_host(char *host_name) {
++my_comment *get_first_comment_by_host(char *host_name) {
+
+ return get_next_comment_by_host(host_name, NULL);
+ }
+
+
+-comment *get_next_comment_by_host(char *host_name, comment *start) {
+- comment *temp_comment = NULL;
++my_comment *get_next_comment_by_host(char *host_name, my_comment *start) {
++ my_comment *temp_comment = NULL;
+
+ if(host_name == NULL || comment_hashlist == NULL)
+ return NULL;
+@@ -645,22 +645,22 @@ comment *get_next_comment_by_host(char *
+ /******************************************************************/
+
+ /* find a service comment by id */
+-comment *find_service_comment(unsigned long comment_id) {
++my_comment *find_service_comment(unsigned long comment_id) {
+
+ return find_comment(comment_id, SERVICE_COMMENT);
+ }
+
+
+ /* find a host comment by id */
+-comment *find_host_comment(unsigned long comment_id) {
++my_comment *find_host_comment(unsigned long comment_id) {
+
+ return find_comment(comment_id, HOST_COMMENT);
+ }
+
+
+ /* find a comment by id */
+-comment *find_comment(unsigned long comment_id, int comment_type) {
+- comment *temp_comment = NULL;
++my_comment *find_comment(unsigned long comment_id, int comment_type) {
++ my_comment *temp_comment = NULL;
+
+ for(temp_comment = comment_list; temp_comment != NULL; temp_comment = temp_comment->next) {
+ if(temp_comment->comment_id == comment_id && temp_comment->comment_type == comment_type)
diff --git a/net/nagios-base/patches/patch-include_comments.h b/net/nagios-base/patches/patch-include_comments.h
new file mode 100644
index 00000000000..4b0bd3fd566
--- /dev/null
+++ b/net/nagios-base/patches/patch-include_comments.h
@@ -0,0 +1,58 @@
+$NetBSD: patch-include_comments.h,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- include/comments.h.orig 2014-08-12 15:00:01.000000000 +0000
++++ include/comments.h
+@@ -58,7 +58,7 @@
+ NAGIOS_BEGIN_DECL
+
+ /* COMMENT structure */
+-typedef struct comment {
++typedef struct my_comment {
+ int comment_type;
+ int entry_type;
+ unsigned long comment_id;
+@@ -71,11 +71,11 @@ typedef struct comment {
+ char *service_description;
+ char *author;
+ char *comment_data;
+- struct comment *next;
+- struct comment *nexthash;
+- } comment;
++ struct my_comment *next;
++ struct my_comment *nexthash;
++ } my_comment;
+
+-extern struct comment *comment_list;
++extern struct my_comment *comment_list;
+
+ #ifndef NSCGI
+ int initialize_comment_data(void); /* initializes comment data */
+@@ -94,12 +94,12 @@ int delete_service_acknowledgement_comme
+ int check_for_expired_comment(unsigned long); /* expires a comment */
+ #endif
+
+-struct comment *find_comment(unsigned long, int); /* finds a specific comment */
+-struct comment *find_service_comment(unsigned long); /* finds a specific service comment */
+-struct comment *find_host_comment(unsigned long); /* finds a specific host comment */
++struct my_comment *find_comment(unsigned long, int); /* finds a specific comment */
++struct my_comment *find_service_comment(unsigned long); /* finds a specific service comment */
++struct my_comment *find_host_comment(unsigned long); /* finds a specific host comment */
+
+-struct comment *get_first_comment_by_host(char *);
+-struct comment *get_next_comment_by_host(char *, struct comment *);
++struct my_comment *get_first_comment_by_host(char *);
++struct my_comment *get_next_comment_by_host(char *, struct my_comment *);
+
+ int number_of_host_comments(char *); /* returns the number of comments associated with a particular host */
+ int number_of_service_comments(char *, char *); /* returns the number of comments associated with a particular service */
+@@ -109,7 +109,7 @@ int sort_comments(void);
+ int add_host_comment(int, char *, time_t, char *, char *, unsigned long, int, int, time_t, int); /* adds a host comment */
+ int add_service_comment(int, char *, char *, time_t, char *, char *, unsigned long, int, int, time_t, int); /* adds a service comment */
+
+-int add_comment_to_hashlist(struct comment *);
++int add_comment_to_hashlist(struct my_comment *);
+
+ void free_comment_data(void); /* frees memory allocated to the comment list */
+
diff --git a/net/nagios-base/patches/patch-include_statusjson.h b/net/nagios-base/patches/patch-include_statusjson.h
new file mode 100644
index 00000000000..b1a7af22662
--- /dev/null
+++ b/net/nagios-base/patches/patch-include_statusjson.h
@@ -0,0 +1,26 @@
+$NetBSD: patch-include_statusjson.h,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- include/statusjson.h.orig 2014-08-12 15:00:01.000000000 +0000
++++ include/statusjson.h
+@@ -123,7 +123,7 @@ typedef struct status_json_cgi_data_stru
+ /* ID of comment for which details should be returned */
+ int comment_id;
+ /* Comment whose id is comment_id */
+- comment * comment;
++ my_comment * comment;
+ /* ID of downtime for which details should be returned */
+ int downtime_id;
+ /* Downtime whose id is downtime_id */
+@@ -260,8 +260,8 @@ extern json_object *json_status_commentc
+ unsigned, unsigned, unsigned, unsigned, char *, char *);
+ extern json_object *json_status_commentlist(unsigned, int, int, int, int,
+ time_t, time_t, unsigned, unsigned, unsigned, unsigned, char *, char *);
+-extern json_object *json_status_comment(unsigned, comment *);
+-extern void json_status_comment_details(json_object *, unsigned, comment *);
++extern json_object *json_status_comment(unsigned, my_comment *);
++extern void json_status_comment_details(json_object *, unsigned, my_comment *);
+
+ extern json_object *json_status_downtimecount(unsigned, int, time_t, time_t,
+ unsigned, unsigned, unsigned, int, unsigned, char *, char *);
diff --git a/net/nagios-base/patches/patch-t-tap_test__xsddefault.c b/net/nagios-base/patches/patch-t-tap_test__xsddefault.c
new file mode 100644
index 00000000000..077492d4bf7
--- /dev/null
+++ b/net/nagios-base/patches/patch-t-tap_test__xsddefault.c
@@ -0,0 +1,24 @@
+$NetBSD: patch-t-tap_test__xsddefault.c,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- t-tap/test_xsddefault.c.orig 2014-08-12 15:00:01.000000000 +0000
++++ t-tap/test_xsddefault.c
+@@ -41,7 +41,7 @@
+ #include "../include/skiplist.h"
+ #include "tap.h"
+
+-extern comment *comment_list;
++extern my_comment *comment_list;
+ extern scheduled_downtime *scheduled_downtime_list;
+
+ int main(int argc, char **argv) {
+@@ -49,7 +49,7 @@ int main(int argc, char **argv) {
+ int c;
+ int last_id;
+ time_t last_time;
+- comment *temp_comment;
++ my_comment *temp_comment;
+ scheduled_downtime *temp_downtime;
+
+ plan_tests(7);
diff --git a/net/nagios-base/patches/patch-xdata_xcddefault.c b/net/nagios-base/patches/patch-xdata_xcddefault.c
new file mode 100644
index 00000000000..1dbb9176610
--- /dev/null
+++ b/net/nagios-base/patches/patch-xdata_xcddefault.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-xdata_xcddefault.c,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- xdata/xcddefault.c.orig 2014-08-12 15:00:01.000000000 +0000
++++ xdata/xcddefault.c
+@@ -40,7 +40,7 @@
+
+ /* initialize comment data */
+ int xcddefault_initialize_comment_data(void) {
+- comment *temp_comment = NULL;
++ my_comment *temp_comment = NULL;
+
+ /* find the new starting index for comment id if its missing*/
+ if(next_comment_id == 0L) {
diff --git a/net/nagios-base/patches/patch-xdata_xrddefault.c b/net/nagios-base/patches/patch-xdata_xrddefault.c
new file mode 100644
index 00000000000..bddadb89a8b
--- /dev/null
+++ b/net/nagios-base/patches/patch-xdata_xrddefault.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-xdata_xrddefault.c,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- xdata/xrddefault.c.orig 2014-08-12 15:00:01.000000000 +0000
++++ xdata/xrddefault.c
+@@ -87,7 +87,7 @@ int xrddefault_save_state_information(vo
+ host *temp_host = NULL;
+ service *temp_service = NULL;
+ contact *temp_contact = NULL;
+- comment *temp_comment = NULL;
++ my_comment *temp_comment = NULL;
+ scheduled_downtime *temp_downtime = NULL;
+ int x = 0;
+ int fd = 0;
diff --git a/net/nagios-base/patches/patch-xdata_xsddefault.c b/net/nagios-base/patches/patch-xdata_xsddefault.c
new file mode 100644
index 00000000000..df755daaf89
--- /dev/null
+++ b/net/nagios-base/patches/patch-xdata_xsddefault.c
@@ -0,0 +1,15 @@
+$NetBSD: patch-xdata_xsddefault.c,v 1.1 2015/04/12 23:33:06 rodent Exp $
+
+Fix build in SunOS.
+
+--- xdata/xsddefault.c.orig 2014-08-12 15:00:01.000000000 +0000
++++ xdata/xsddefault.c
+@@ -118,7 +118,7 @@ int xsddefault_save_status_data(void) {
+ host *temp_host = NULL;
+ service *temp_service = NULL;
+ contact *temp_contact = NULL;
+- comment *temp_comment = NULL;
++ my_comment *temp_comment = NULL;
+ scheduled_downtime *temp_downtime = NULL;
+ time_t current_time;
+ int fd = 0;