aboutsummaryrefslogtreecommitdiffstats
path: root/src/u_utils.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/u_utils.c')
-rw-r--r--src/u_utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/u_utils.c b/src/u_utils.c
index cfaec25..13cb245 100644
--- a/src/u_utils.c
+++ b/src/u_utils.c
@@ -43,7 +43,11 @@
* 2020-11-05 19:27
*/
+#include <errno.h>
+#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
void
u_memdel(void** ptr)
@@ -51,3 +55,13 @@ u_memdel(void** ptr)
free(*ptr);
*ptr = NULL;
}
+
+void
+u_dump_errno(void)
+{
+ dprintf(
+ STDERR_FILENO,
+ "unixize: %s\n",
+ strerror(errno)
+ );
+}