diff --git a/universal7885-common/apps/aidl-support/include/LogFormat.h b/universal7885-common/apps/aidl-support/include/LogFormat.h index 7c22422..13b3257 100644 --- a/universal7885-common/apps/aidl-support/include/LogFormat.h +++ b/universal7885-common/apps/aidl-support/include/LogFormat.h @@ -3,9 +3,12 @@ #ifdef LOG_TAG +#include #include -#define make_str(a, ...) _make_str(__FILE__, __LINE__, a, ##__VA_ARGS__).c_str() +#define __FILENAME__ (strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__) + +#define make_str(a, ...) _make_str(__FILENAME__, __LINE__, a, ##__VA_ARGS__).c_str() // Helpers to avoid -Wformat-security #define LOG_E(fmt, ...) ALOGE("%s", make_str(fmt, ##__VA_ARGS__))