tag slirp console output

This commit is contained in:
Nadia Holmquist Pedersen 2024-05-15 17:29:20 +02:00
parent 384a2770ae
commit de0a83e019
2 changed files with 5 additions and 4 deletions

View File

@ -52,6 +52,7 @@ target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src")
target_include_directories(slirp PUBLIC "${CMAKE_CURRENT_BINARY_DIR}")
target_compile_definitions(slirp PRIVATE BUILDING_LIBSLIRP)
target_compile_definitions(slirp PRIVATE "G_LOG_DOMAIN=\"Slirp\"")
if (WIN32)
target_link_libraries(slirp PRIVATE ws2_32 iphlpapi)

View File

@ -87,10 +87,10 @@ typedef int gint;
typedef size_t gsize;
typedef void* gpointer;
#define g_debug printf
#define g_warning printf
#define g_error printf
#define g_critical printf
#define g_debug(format, ...) printf("[" G_LOG_DOMAIN ": debug] " format, ##__VA_ARGS__)
#define g_warning(format, ...) printf("[" G_LOG_DOMAIN ": warning] " format, ##__VA_ARGS__)
#define g_error(format, ...) printf("[" G_LOG_DOMAIN ": error] " format, ##__VA_ARGS__)
#define g_critical(format, ...) printf("[" G_LOG_DOMAIN ": critical] " format, ##__VA_ARGS__)
#define g_new(type, count) (type*) (count > 0 ? malloc(sizeof(type) * count) : NULL)
#define g_new0(type, count) (type*) (count > 0 ? calloc(count, sizeof(type)) : NULL)