Code

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 13304f2a18075d2333c98c7daae66b64db8e766f..61daa58c6ba1f07a4fbfa3716125b3fcb0be73b2 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 */