summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 8dca6a2)
raw | patch | inline | side by side (parent: 8dca6a2)
author | octo <octo> | |
Fri, 21 Apr 2006 07:52:42 +0000 (07:52 +0000) | ||
committer | octo <octo> | |
Fri, 21 Apr 2006 07:52:42 +0000 (07:52 +0000) |
configure.in | patch | blob | history | |
src/Makefile.am | patch | blob | history | |
src/collectd.c | patch | blob | history | |
src/common.c | patch | blob | history | |
src/hddtemp.c | patch | blob | history | |
src/nfs.c | patch | blob | history |
diff --git a/configure.in b/configure.in
index f2573a3202cc43c74fb60934d5b1f58c8bcbc629..aae2a77113f51378c1e6c5f8ea425d89183c1242 100644 (file)
--- a/configure.in
+++ b/configure.in
])
AC_CHECK_HEADERS(IOKit/ps/IOPSKeys.h)
-# For the `disk' plugin
-AC_CHECK_HEADERS(IOKit/IOBSD.h)
-AC_CHECK_HEADERS(IOKit/storage/IOBlockStorageDriver.h)
-
# For load module
AC_CHECK_HEADERS(sys/loadavg.h)
AC_CHECK_FUNCS(strncasecmp strcasecmp)
AC_CHECK_FUNCS(openlog syslog closelog)
+nanosleep_needs_rt="no"
+AC_CHECK_FUNCS(nanosleep, [], AC_CHECK_LIB(rt, nanosleep, [nanosleep_needs_rt="yes"], AC_MSG_ERROR(cannot find nanosleep)))
+AM_CONDITIONAL(BUILD_WITH_LIBRT, test "x$nanosleep_needs_rt" = "xyes")
+
# For cpu module
AC_CHECK_FUNCS(sysctlbyname, [have_sysctlbyname="yes"], [have_sysctlbyname="no"])
diff --git a/src/Makefile.am b/src/Makefile.am
index 025548a1e06595825baa800aaacca318cd43c218..1fa0c07cdd45aa36214f421ed2d2fb549455dc7c 100644 (file)
--- a/src/Makefile.am
+++ b/src/Makefile.am
if BUILD_WITH_RRDTOOL
collectd_LDFLAGS += -lm -lrrd
endif
+if BUILD_WITH_LIBRT
+collectd_LDFLAGS += -lrt
+endif
if BUILD_WITH_LIBSOCKET
collectd_LDFLAGS += -lsocket
endif
pkglib_LTLIBRARIES += disk.la
disk_la_SOURCES = disk.c
disk_la_LDFLAGS = -module -avoid-version
-if BUILD_WITH_LIBIOKIT
-disk_la_LDFLAGS += -lIOKit
-endif
collectd_LDADD += "-dlopen" disk.la
collectd_DEPENDENCIES += disk.la
endif
diff --git a/src/collectd.c b/src/collectd.c
index 1b44e1537153afbef6edc546739c6a174791d961..b4ee50460d947bfb04359119ef3c6bdd5504bae5 100644 (file)
--- a/src/collectd.c
+++ b/src/collectd.c
return (1);
}
- fprintf (fh, "%d\n", getpid());
+ fprintf (fh, "%i\n", (int) getpid ());
fclose(fh);
return (0);
diff --git a/src/common.c b/src/common.c
index 58db4d8aa0166a51f49100f9c665925b730836de..d1f15513409c137d3430eb3d2420c3f9ec4122dc 100644 (file)
--- a/src/common.c
+++ b/src/common.c
/* The `%.*s' is needed because there is no null-byte behind
* the name. */
- fprintf(log, ",%.*s", (tmp - name), name);
+ fprintf(log, ",%.*s", (int) (tmp - name), name);
}
fprintf(log, "\n");
fclose(log);
diff --git a/src/hddtemp.c b/src/hddtemp.c
index a89765a73447443c2124804aac2d0373eb48a083..cbe6e80ab541f6f0b0a003f74d93d7bccfa8a90f 100644 (file)
--- a/src/hddtemp.c
+++ b/src/hddtemp.c
if ((entry = (hddname_t *) malloc (sizeof (hddname_t))) == NULL)
{
- syslog (LOG_ERR, "hddtemp: malloc (%u) == NULL", sizeof (hddname_t));
+ syslog (LOG_ERR, "hddtemp: malloc (%u) == NULL",
+ (unsigned int) sizeof (hddname_t));
free (name);
continue;
}
diff --git a/src/nfs.c b/src/nfs.c
index efb8dc68b542954443ddc4feb925b91153bf0823..d0f33c5238269638d00ae52b8bb462b3489ddb0f 100644 (file)
--- a/src/nfs.c
+++ b/src/nfs.c
#define MODULE_NAME "nfs"
-#if defined(KERNEL_LINUX) || defined(HAVE_LIBKSTAT)
+/* #if defined(KERNEL_LINUX) || defined(HAVE_LIBKSTAT) */
+#if KERNEL_LINUX
# define NFS_HAVE_READ 1
#else
# define NFS_HAVE_READ 0
};
static int nfs3_procedures_ds_num = 22;
-#ifdef HAVE_LIBKSTAT
+#if HAVE_LIBKSTAT && 0
extern kstat_ctl_t *kc;
static kstat_t *nfs2_ksp_client;
static kstat_t *nfs2_ksp_server;
static void nfs_init (void)
{
-#ifdef HAVE_LIBKSTAT
+#if HAVE_LIBKSTAT && 0
kstat_t *ksp_chain;
nfs2_ksp_client = NULL;
}
#endif /* NFS_HAVE_READ */
-#if defined(KERNEL_LINUX)
+#if KERNEL_LINUX
static void nfs_read_stats_file (FILE *fh, char *inst)
{
char buffer[BUFSIZE];
#endif /* defined(KERNEL_LINUX) */
#undef BUFSIZE
-#ifdef HAVE_LIBKSTAT
+#if HAVE_LIBKSTAT && 0
static void nfs2_read_kstat (kstat_t *ksp, char *inst)
{
unsigned long long values[18];
#if NFS_HAVE_READ
static void nfs_read (void)
{
-#if defined(KERNEL_LINUX)
+#if KERNEL_LINUX
FILE *fh;
if ((fh = fopen ("/proc/net/rpc/nfs", "r")) != NULL)
/* #endif defined(KERNEL_LINUX) */
-#elif defined(HAVE_LIBKSTAT)
+#elif HAVE_LIBKSTAT && 0
if (nfs2_ksp_client != NULL)
nfs2_read_kstat (nfs2_ksp_client, "client");
if (nfs2_ksp_server != NULL)