瀏覽代碼

Fix GCC compilation

On GNUC use the GCC extension "##__VA_ARGS__"
Hansi P 1 年之前
父節點
當前提交
ebd2f1f99a
共有 1 個文件被更改,包括 5 次插入0 次删除
  1. 5 0
      src/civetweb.c

+ 5 - 0
src/civetweb.c

@@ -230,8 +230,13 @@ static void DEBUG_TRACE_FUNC(const char *func,
                              PRINTF_FORMAT_STRING(const char *fmt),
                              ...) PRINTF_ARGS(3, 4);
 
+#if defined(__GNUC__)
+#define DEBUG_TRACE(fmt, ...)                                                  \
+	DEBUG_TRACE_FUNC(__func__, __LINE__, fmt, ##__VA_ARGS__)
+#else
 #define DEBUG_TRACE(fmt, ...)                                                  \
 	DEBUG_TRACE_FUNC(__func__, __LINE__, fmt, __VA_ARGS__)
+#endif
 
 #define NEED_DEBUG_TRACE_FUNC
 #if !defined(DEBUG_TRACE_STREAM)