summaryrefslogtreecommitdiff
path: root/src/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/config.h')
-rw-r--r--src/config.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/config.h b/src/config.h
index 68e99b427..961503c63 100644
--- a/src/config.h
+++ b/src/config.h
@@ -105,6 +105,18 @@
#define rdb_fsync_range(fd,off,size) fsync(fd)
#endif
+/* Check if we can use setproctitle().
+ * BSD systems have support for it, we provide an implementation for
+ * Linux and osx. */
+#if (defined __NetBSD__ || defined __FreeBSD__ || defined __OpenBSD__)
+#define USE_SETPROCTITLE
+#endif
+
+#if (defined __linux || defined __APPLE__)
+#define USE_SETPROCTITLE
+void setproctitle(const char *fmt, ...);
+#endif
+
/* Byte ordering detection */
#include <sys/types.h> /* This will likely define BYTE_ORDER */