collectdmon: define PREFIX and LOCALSTATEDIR
authorRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 13 Aug 2016 14:34:37 +0000 (16:34 +0200)
committerRuben Kerkhof <ruben@rubenkerkhof.com>
Sat, 13 Aug 2016 14:34:37 +0000 (16:34 +0200)
Not an issue in practice, but this helps when running the code through
lint.

src/collectdmon.c

index 13304f2..61daa58 100644 (file)
 
 #include <unistd.h>
 
+#ifndef PREFIX
+# define PREFIX "/opt/" PACKAGE_NAME
+#endif
+
+#ifndef LOCALSTATEDIR
+# define LOCALSTATEDIR PREFIX "/var"
+#endif
+
 #ifndef COLLECTDMON_PIDFILE
 # define COLLECTDMON_PIDFILE LOCALSTATEDIR"/run/collectdmon.pid"
 #endif /* ! COLLECTDMON_PIDFILE */