Please include `"collectd.h"` as the very first header file. Generally, include `"collectd.h"`, `"plugin.h"`, `"common.h"` and friends first, then `<sys/*>`, then other system-wide header files.