Code

Moved sdb_strerror() from utils/string.h to utils/error.h.
[sysdb.git] / src / include / utils / error.h
index 73b48baacf2c1cdf9f5df66118166fc90c6df408..487b6e4ffcaa98dffd1202e5667c102fdfcd960e 100644 (file)
@@ -39,6 +39,8 @@
 #ifndef SDB_UTILS_ERROR_H
 #define SDB_UTILS_ERROR_H 1
 
+#include <stddef.h>
+
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -114,6 +116,14 @@ sdb_error_get(void);
 int
 sdb_error_get_prio(void);
 
+/*
+ * sdb_strerror:
+ * This is a wrapper around the system's strerror function which ensures that
+ * a pointer to the formatted error message is returned.
+ */
+char *
+sdb_strerror(int errnum, char *strerrbuf, size_t buflen);
+
 #ifdef __cplusplus
 } /* extern "C" */
 #endif