[Nagiosplug-devel] [ nagiosplug-Patches-2816049 ] Solaris pst3 string functions undeclared
SourceForge.net
noreply at sourceforge.net
Fri Jul 3 02:25:41 CEST 2009
Patches item #2816049, was opened at 2009-07-03 10:25
Message generated for change (Tracker Item Submitted) made by dejavu4u2
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: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Grant Byers (dejavu4u2)
Assigned to: Nobody/Anonymous (nobody)
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>
----------------------------------------------------------------------
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