diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-21 22:07:23 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-01-21 22:08:35 +0100 |
commit | 65bf6cf8610ed8e9541db6df3060ab390002ef36 (patch) | |
tree | c26929c7d4a5157df17a723fa0732048ef5fdf85 /main.c | |
parent | 4d12a12570876810d0376d31b280674b5c49054a (diff) |
few fixes to compile on non-linux plaftorms
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 12 |
1 files changed, 11 insertions, 1 deletions
@@ -20,7 +20,14 @@ #include <string.h> #include <stdlib.h> #include <time.h> +#ifdef __linux__ +#include <sys/prctl.h> +#endif +#ifndef __linux__ +#define _POSIX_C_SOURCE +#endif #include <limits.h> +#include <errno.h> #include <sys/stat.h> #include <sys/types.h> #include <sys/types.h> @@ -28,7 +35,6 @@ #include <sys/un.h> #include <sys/fcntl.h> #include <sys/errno.h> -#include <sys/prctl.h> #include <signal.h> #ifdef HAVE_CONFIG_H # include <config.h> @@ -45,6 +51,10 @@ #include "session.h" #include "plugins.h" +#ifndef PATH_MAX +#define PATH_MAX 1024 /* max # of characters in a path name */ +#endif + #ifndef PREFIX #error PREFIX must be defined #endif |