From e06c3e99d8d42d3422bf8ebf50fd500da1cf4ccf Mon Sep 17 00:00:00 2001 From: "Kelvin M. Klann" Date: Sat, 17 Jun 2023 15:09:35 -0300 Subject: common.h: use __func__ instead of __FUNCTION__ For increased portability. The former is in C99, the latter is from gcc. --- src/include/common.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/include') 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 @@ #include #include +#if !defined(__func__) && defined(__FUNCTION__) +#define __func__ __FUNCTION__ +#endif + // dbus proxy path used by firejail and firemon #define XDG_DBUS_PROXY_PATH "/usr/bin/xdg-dbus-proxy" #define errExit(msg) do { \ char msgout[500]; \ - snprintf(msgout, 500, "Error %s: %s:%d %s", msg, __FILE__, __LINE__, __FUNCTION__); \ + snprintf(msgout, 500, "Error %s: %s:%d %s", msg, __FILE__, __LINE__, __func__); \ perror(msgout); \ exit(1); \ } while (0) -- cgit v1.2.3-54-g00ecf