aboutsummaryrefslogtreecommitdiffstats
path: root/src/include/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/common.h')
-rw-r--r--src/include/common.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/include/common.h b/src/include/common.h
index a0ad8c765..4a2b8c1bf 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -32,11 +32,20 @@
32#include <ctype.h> 32#include <ctype.h>
33#include <assert.h> 33#include <assert.h>
34 34
35#if !defined(__func__) && defined(__FUNCTION__)
36#define __func__ __FUNCTION__
37#endif
38
35// dbus proxy path used by firejail and firemon 39// dbus proxy path used by firejail and firemon
36#define XDG_DBUS_PROXY_PATH "/usr/bin/xdg-dbus-proxy" 40#define XDG_DBUS_PROXY_PATH "/usr/bin/xdg-dbus-proxy"
37 41
38 42#define errExit(msg) do { \
39#define errExit(msg) do { char msgout[500]; snprintf(msgout, 500, "Error %s: %s:%d %s", msg, __FILE__, __LINE__, __FUNCTION__); perror(msgout); exit(1);} while (0) 43 char msgout[500]; \
44 snprintf(msgout, 500, "Error %s/%s:%d %s(): %s", \
45 MOD_DIR, __FILE__, __LINE__, __func__, msg); \
46 perror(msgout); \
47 exit(1); \
48} while (0)
40 49
41// macro to print ip addresses in a printf statement 50// macro to print ip addresses in a printf statement
42#define PRINT_IP(A) \ 51#define PRINT_IP(A) \