aboutsummaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-17 15:09:35 -0300
committerLibravatar Kelvin M. Klann <kmk3.code@protonmail.com>2023-06-28 03:43:56 -0300
commite06c3e99d8d42d3422bf8ebf50fd500da1cf4ccf (patch)
treef403e104aa8d49df24a78af4b077f47f9f78d0a7 /src/include
parentcommon.h: line-wrap errExit (diff)
downloadfirejail-e06c3e99d8d42d3422bf8ebf50fd500da1cf4ccf.tar.gz
firejail-e06c3e99d8d42d3422bf8ebf50fd500da1cf4ccf.tar.zst
firejail-e06c3e99d8d42d3422bf8ebf50fd500da1cf4ccf.zip
common.h: use __func__ instead of __FUNCTION__
For increased portability. The former is in C99, the latter is from gcc.
Diffstat (limited to 'src/include')
-rw-r--r--src/include/common.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/include/common.h b/src/include/common.h
index 060945f82..23b00b6f8 100644
--- a/src/include/common.h
+++ b/src/include/common.h
@@ -32,12 +32,16 @@
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#define errExit(msg) do { \ 42#define errExit(msg) do { \
39 char msgout[500]; \ 43 char msgout[500]; \
40 snprintf(msgout, 500, "Error %s: %s:%d %s", msg, __FILE__, __LINE__, __FUNCTION__); \ 44 snprintf(msgout, 500, "Error %s: %s:%d %s", msg, __FILE__, __LINE__, __func__); \
41 perror(msgout); \ 45 perror(msgout); \
42 exit(1); \ 46 exit(1); \
43} while (0) 47} while (0)