Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #if/#ifdef confusion, detected by -Werror=undef #25

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,12 @@ add_qtc_library(perfparser_lib STATIC
if (Zstd_FOUND)
target_include_directories(perfparser_lib PUBLIC ${Zstd_INCLUDE_DIR})
target_link_libraries(perfparser_lib PUBLIC ${Zstd_LIBRARY})
target_compile_definitions(perfparser_lib PUBLIC HAVE_ZSTD=1)
target_compile_definitions(perfparser_lib PUBLIC HAVE_ZSTD)
endif()

if (HAVE_DWFL_GET_DEBUGINFOD_CLIENT)
target_link_libraries(perfparser_lib PRIVATE elfutils::debuginfod)
target_compile_definitions(perfparser_lib PRIVATE HAVE_DWFL_GET_DEBUGINFOD_CLIENT=1)
target_compile_definitions(perfparser_lib PRIVATE HAVE_DWFL_GET_DEBUGINFOD_CLIENT)
endif()

add_qtc_executable(perfparser
Expand Down
4 changes: 2 additions & 2 deletions app/perfsymboltable.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
#include <dwarf.h>
#include <elfutils/libdwelf.h>

#if HAVE_DWFL_GET_DEBUGINFOD_CLIENT
#ifdef HAVE_DWFL_GET_DEBUGINFOD_CLIENT
#include <debuginfod.h>
#endif

Expand Down Expand Up @@ -70,7 +70,7 @@ PerfSymbolTable::PerfSymbolTable(qint32 pid, Dwfl_Callbacks *callbacks, PerfUnwi

m_dwfl = dwfl_begin(m_callbacks);

#if HAVE_DWFL_GET_DEBUGINFOD_CLIENT
#ifdef HAVE_DWFL_GET_DEBUGINFOD_CLIENT
auto client = dwfl_get_debuginfod_client(m_dwfl);
debuginfod_set_user_data(client, this);
debuginfod_set_progressfn(client, [](debuginfod_client* client, long numerator, long denominator) {
Expand Down