[Nagiosplug-devel] [ nagiosplug-Patches-2816049 ] Solaris pst3 string functions undeclared

SourceForge.net noreply at sourceforge.net
Wed Jul 15 00:26:28 CEST 2009


Patches item #2816049, was opened at 2009-07-03 01:25
Message generated for change (Comment added) made by tonvoon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2816049&group_id=29880

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Bugfix
Group: None
>Status: Closed
>Resolution: Fixed
Priority: 5
Private: No
Submitted By: Grant Byers (dejavu4u2)
>Assigned to: Ton Voon (tonvoon)
Summary: Solaris pst3 string functions undeclared

Initial Comment:
pst3.c doesn't include string.h (or unistd.h)

root# ./pst3
S   UID   PID  PPID    VSZ    RSS %CPU COMMAND ARGS
Segmentation Fault (core dumped)

This is due to string functions such as strdup, strchr & strrchr not being declared, thus returning int. Simply including the necessary headers

SunOS unix 5.10 Generic_138888-01 sun4u sparc SUNW,Sun-Fire-V890

Sun Studio Compiler 12 
root# /opt/SUNWspro/bin/cc -V
cc: Sun C 5.9 SunOS_sparc Patch 124867-01 2007/07/12

/opt/SUNWspro/bin/cc -o pst3 -m64 pst3.c

--- pst3.c      Fri Jul  3 10:16:28 2009
+++ pst3.c.gbst Fri Jul  3 10:16:39 2009
@@ -43,6 +43,8 @@

 #include <stdio.h>
 #include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
 #include <dirent.h>
 #include <errno.h>
 #include <fcntl.h>


----------------------------------------------------------------------

>Comment By: Ton Voon (tonvoon)
Date: 2009-07-14 23:26

Message:
Grant,

Thanks. Fixed in git. Should be in the next snapshot at
http://nagiosplug.sf.net/snapshot.

p.s. Interested in providing a tinderbox build server?
http://nagiosplugins.org/tinderbox

Ton

----------------------------------------------------------------------

Comment By: Ton Voon (tonvoon)
Date: 2009-07-14 23:26

Message:
This problem is now fixed in Git. Thank you for your report.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=397599&aid=2816049&group_id=29880




More information about the Devel mailing list