Fix: large audit of close() use in sessiond main.c
[lttng-tools.git] / src / common / error.h
index 2ce6f57c287e4991ad28d284a861ca440569561e..822dccfedfee1e5ded65db0c716522c9bd814ec8 100644 (file)
@@ -20,6 +20,7 @@
 
 #include <errno.h>
 #include <stdio.h>
+#include <string.h>
 
 /* Stringify the expansion of a define */
 #define XSTR(d) STR(d)
@@ -74,7 +75,8 @@ extern int opt_verbose;
                " [in %s() at " __FILE__ ":" XSTR(__LINE__) "]\n", ## args, __func__)
 
 #define _PERROR(fmt, args...) \
-       __lttng_print(PRINT_ERR, "perror " fmt "\n", ## args)
+       __lttng_print(PRINT_ERR, "PERROR: " fmt \
+               " [in %s() at " __FILE__ ":" XSTR(__LINE__) "]\n", ## args, __func__)
 
 #define PERROR(call, args...) \
     do { \
This page took 0.023452 seconds and 4 git commands to generate.