diff options
author | Toni Uhlig <matzeton@googlemail.com> | 2024-03-21 06:15:04 +0100 |
---|---|---|
committer | Toni Uhlig <matzeton@googlemail.com> | 2024-03-21 07:26:22 +0100 |
commit | 33560d64d2f77b7ef181ea6c02d22f21fbe4e91f (patch) | |
tree | a9c92d25f780a3fd68af99d56e700f0b66d9e9ca /examples/c-notifyd | |
parent | 675640b0e647ff2084d973b5d3f302b3a6f978bf (diff) |
Fix example build error if memory profiling enabled.
* CI: build against libnDPI with `-DNDPI_NO_PKGCONFIG=ON` and `-DSTATIC_LIBNDPI_INSTALLDIR=/usr`
* CI: `ENABLE_DBUS=ON` for most builds
Signed-off-by: Toni Uhlig <matzeton@googlemail.com>
Diffstat (limited to 'examples/c-notifyd')
-rw-r--r-- | examples/c-notifyd/c-notifyd.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/examples/c-notifyd/c-notifyd.c b/examples/c-notifyd/c-notifyd.c index 130d22fa1..eb14c6377 100644 --- a/examples/c-notifyd/c-notifyd.c +++ b/examples/c-notifyd/c-notifyd.c @@ -75,6 +75,29 @@ static int main_thread_shutdown = 0; static char * pidfile = NULL; static char * serv_optarg = NULL; +#ifdef ENABLE_MEMORY_PROFILING +void nDPIsrvd_memprof_log_alloc(size_t alloc_size) +{ + (void)alloc_size; +} + +void nDPIsrvd_memprof_log_free(size_t free_size) +{ + (void)free_size; +} + +void nDPIsrvd_memprof_log(char const * const format, ...) +{ + va_list ap; + + va_start(ap, format); + fprintf(stderr, "%s", "nDPIsrvd MemoryProfiler: "); + vfprintf(stderr, format, ap); + fprintf(stderr, "%s\n", ""); + va_end(ap); +} +#endif + static void send_to_dbus(char const * const icon, char const * const urgency, enum dbus_level level, |