summaryrefslogtreecommitdiffstats
path: root/src/ft_f_fail.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ft_f_fail.c')
-rw-r--r--src/ft_f_fail.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/ft_f_fail.c b/src/ft_f_fail.c
index 621702b..b43281d 100644
--- a/src/ft_f_fail.c
+++ b/src/ft_f_fail.c
@@ -12,7 +12,10 @@
#include <libft.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
+#include <errno.h>
+
#include "ft_d_define.h"
static void
@@ -45,6 +48,6 @@ void
void
ft_fail_alloc(void)
{
- ft_write_fail("minishell", FT_FAIL_ALLOC);
+ ft_write_fail("minishell", strerror(errno));
exit(FT_RET_ALLOC);
}