Skip to content

Commit

Permalink
build: fix compilation issue on OpenBSD
Browse files Browse the repository at this point in the history
During our development, we modified the way
we report backtraces.

On a minimal configuration in OpenBSD, it seems that we
no longer compile from commit a9f26b7 because
our conditional code is buggy.

With the following compiler

vultr# cc -v
OpenBSD clang version 13.0.0
Target: amd64-unknown-openbsd7.3
Thread model: posix
InstalledDir: /usr/bin

We have the following error

cc common/channel_id.c
cc common/daemon.c
common/daemon.c:218:2: error: implicit declaration of function 'add_steal_notifiers' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
        add_steal_notifiers(NULL);
        ^
1 error generated.
gmake: *** [Makefile:298: common/daemon.o] Error 1

Reported-by: @grubles
Fixes a9f26b7
Signed-off-by: Vincenzo Palazzo <[email protected]>
  • Loading branch information
vincenzopalazzo committed Oct 15, 2023
1 parent 8f6a02c commit e936eea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions common/daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,10 @@ const char *backtrace_symname(const tal_t *ctx, const void *addr)
{
return "unknown (backtrace unsupported)";
}

static void add_steal_notifiers(const tal_t *root)
{
}
#endif

int daemon_poll(struct pollfd *fds, nfds_t nfds, int timeout)
Expand Down

0 comments on commit e936eea

Please sign in to comment.