libsysprof: use #if instead of #ifdef for HAVE_LIBSYSTEMD

Fixes #88
This commit is contained in:
Christian Hergert
2023-08-02 10:00:32 -07:00
parent 95a3177623
commit 61f94957d3

View File

@ -29,7 +29,7 @@
#include "sysprof-instrument-private.h" #include "sysprof-instrument-private.h"
#include "sysprof-recording-private.h" #include "sysprof-recording-private.h"
#ifdef HAVE_LIBSYSTEMD #if HAVE_LIBSYSTEMD
# include "sysprof-journald-source.h" # include "sysprof-journald-source.h"
#endif #endif
@ -45,7 +45,7 @@ struct _SysprofSystemLogsClass
G_DEFINE_FINAL_TYPE (SysprofSystemLogs, sysprof_system_logs, SYSPROF_TYPE_INSTRUMENT) G_DEFINE_FINAL_TYPE (SysprofSystemLogs, sysprof_system_logs, SYSPROF_TYPE_INSTRUMENT)
#ifdef HAVE_LIBSYSTEMD #if HAVE_LIBSYSTEMD
static char * static char *
journal_get_data (sd_journal *journal, journal_get_data (sd_journal *journal,
const char *field) const char *field)
@ -129,7 +129,7 @@ sysprof_system_logs_callback (SysprofCaptureWriter *writer,
} }
#endif #endif
#ifdef HAVE_LIBSYSTEMD #if HAVE_LIBSYSTEMD
static DexFuture * static DexFuture *
sysprof_system_logs_record_finished (DexFuture *future, sysprof_system_logs_record_finished (DexFuture *future,
gpointer user_data) gpointer user_data)
@ -145,7 +145,7 @@ sysprof_system_logs_record (SysprofInstrument *instrument,
SysprofRecording *recording, SysprofRecording *recording,
GCancellable *cancellable) GCancellable *cancellable)
{ {
#ifdef HAVE_LIBSYSTEMD #if HAVE_LIBSYSTEMD
SysprofCaptureWriter *writer; SysprofCaptureWriter *writer;
GSource *source; GSource *source;