diff options
author | Dennis Friis <peavey@inspircd.org> | 2009-07-03 16:36:49 +0200 |
---|---|---|
committer | Dennis Friis <peavey@inspircd.org> | 2009-07-03 16:36:49 +0200 |
commit | cbb9bb3617952a7736f5047ba4a74eae29521599 (patch) | |
tree | 5d199c75d7d7608c4a8d613e5564c466fcaf4dd0 | |
parent | 381151eb83dbfb753b6cbb031546fd2d4a828f69 (diff) | |
download | tmwa-cbb9bb3617952a7736f5047ba4a74eae29521599.tar.gz tmwa-cbb9bb3617952a7736f5047ba4a74eae29521599.tar.bz2 tmwa-cbb9bb3617952a7736f5047ba4a74eae29521599.tar.xz tmwa-cbb9bb3617952a7736f5047ba4a74eae29521599.zip |
Fix some includes.
fixes mantis #760 reported by aidamax.
-rwxr-xr-x | eathena-monitor | bin | 18336 -> 11597 bytes | |||
-rw-r--r-- | eathena-monitor.c | 28 |
2 files changed, 22 insertions, 6 deletions
diff --git a/eathena-monitor b/eathena-monitor Binary files differindex fd1d36c..b883334 100755 --- a/eathena-monitor +++ b/eathena-monitor diff --git a/eathena-monitor.c b/eathena-monitor.c index 13048d4..d0b3995 100644 --- a/eathena-monitor.c +++ b/eathena-monitor.c @@ -1,9 +1,9 @@ -/* -Name: eAthena processes monitor -Author: Bartosz Waszak <waszi@evil.org.pl> -License: GPL -Compilation: -gcc -o eathena-monitor eathena-monitor.c +/** + * Name: eAthena processes monitor + * Author: Bartosz Waszak <waszi@evil.org.pl> + * License: GPL + * Compilation: + * gcc -o eathena-monitor eathena-monitor.c */ #include <unistd.h> @@ -11,7 +11,21 @@ gcc -o eathena-monitor eathena-monitor.c #include <string.h> #include <stdlib.h> #include <sys/types.h> +#include <sys/stat.h> + +#if !defined(linux) && (defined(__sgi) || defined(__sun__) || defined(__sun) || defined(__sparc) || defined(__sparc__)) +#include <sys/statfs.h> +#endif + +#if defined (__FreeBSD__) || defined (__OpenBSD__) || defined (__NetBSD__) || defined (__APPLE__) +#include <sys/param.h> +#include <sys/mount.h> +#endif + +#if defined(linux) || defined(__CYGWIN32__) || defined(__hpux) #include <sys/vfs.h> +#endif + #include <dirent.h> #include <errno.h> #include <time.h> @@ -25,7 +39,9 @@ gcc -o eathena-monitor eathena-monitor.c #define CHAR_SERVER "char-server" #define CONFIG "conf/eathena-monitor.conf" #define LOGFILE "log/eathena-monitor.log" +#ifndef PATH_MAX #define PATH_MAX 4096 +#endif #define IS_BLANK(ptr) \ (((*(ptr)) == ' ') || ((*(ptr)) == '\b') || \ |