src/utils_avltree.[ch]: Rename all types and functions to use the prefix `c_avl_'.
[collectd.git] / src / common.h
index b07db9d..f12b5e4 100644 (file)
 #include "collectd.h"
 #include "plugin.h"
 
+#if HAVE_PWD_H
+# include <pwd.h>
+#endif
+
 #define sfree(ptr) \
        if((ptr) != NULL) { \
                free(ptr); \
@@ -172,4 +176,9 @@ int parse_identifier (char *str, char **ret_host,
                char **ret_type, char **ret_type_instance);
 int parse_values (char *buffer, value_list_t *vl, const data_set_t *ds);
 
+#if !HAVE_GETPWNAM_R
+int getpwnam_r (const char *name, struct passwd *pwbuf, char *buf,
+               size_t buflen, struct passwd **pwbufp);
+#endif
+
 #endif /* COMMON_H */