-
Notifications
You must be signed in to change notification settings - Fork 164
Open
Description
Hi,
I attempted to compile libdill without build system
(just cc every source file and link it by hand)
and found out that compilation of libdill/fd.c
fails due to:
$ cc fd.c -o fd.o -c ; cc --version ; uname -srm
fd.c: In function ‘dill_fd_allocbuf’:
fd.c:59:43: error: ‘struct dill_ctx’ has no member named ‘fd’
59 | struct dill_ctx_fd *ctx = &dill_getctx->fd;
| ^~
fd.c: In function ‘dill_fd_freebuf’:
fd.c:71:43: error: ‘struct dill_ctx’ has no member named ‘fd’
71 | struct dill_ctx_fd *ctx = &dill_getctx->fd;
| ^~
cc (GCC) 14.2.1 20240910
Linux 6.12.8-arch1-1 x86_64
It's because struct dill_ctx_fd
is defined conditionally here:
Lines 40 to 42 in 32d0e8b
#if defined DILL_SOCKETS | |
struct dill_ctx_fd fd; | |
#endif |
but its usage in
libdill/fd.c
is NOT guarder by DILL_SOCKETS
This is of course easy to workaround with $ cc fd.c -c -DDILL_SOCKETS
but I fought it would be nice to report since it's the only issue (with #234 )
preventing libdill from being compiled without it's build system.
For comparison, there is a similar macro DILL_THREADS
which does not need to be defined in order to compile libdill.
Metadata
Metadata
Assignees
Labels
No labels