[PATCH v2 00/25] Simplify inclusion conditionals
andrew at digital-domain.net
Mon Jun 20 12:28:41 UTC 2022
On Mon, 20 Jun 2022 09:10:43 +0200
Alejandro Colomar <alx.manpages at gmail.com> wrote:
> Hi Andrew,
> But patch 25/25 for some reason breaks completely unrelated stuff
> from <sys/socket.h> that I can't fix even if I include
> <sys/socket.h> directly in the file that breaks. I can't make any
> sense of it right now; could you please have a look at it? Try to
> compile after 24, which should work, and then compile after 25 and
> you'll be shocked, I guess;).
Hmm, it's fine here, Fedora 36, glibc 2.35.
Actually last night when I was testing I initially got the following
cc -c -pipe -fPIC -fvisibility=hidden -O0 -W -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-prototypes -Werror -g3 -I src -I build \
-o build/src/nxt_lib.o \
-MMD -MF build/src/nxt_lib.dep -MT build/src/nxt_lib.o \
In file included from src/nxt_main.h:80,
src/nxt_socket.h:69:37: error: invalid application of ‘sizeof’ to incomplete type ‘struct sockaddr_un’
69 | #define NXT_SOCKADDR_LEN sizeof(struct sockaddr_un)
src/nxt_socket.h:82:36: note: in expansion of macro ‘NXT_SOCKADDR_LEN’
82 | char space[NXT_SOCKADDR_LEN];
In file included from src/nxt_main.h:143:
src/nxt_event_engine.h:194:35: error: field ‘event’ has incomplete type
194 | struct epoll_event event;
In file included from src/nxt_main.h:150:
src/nxt_sockaddr.h:55:35: error: field ‘sockaddr_un’ has incomplete type
55 | struct sockaddr_un sockaddr_un;
make: *** [build/Makefile:163: build/src/nxt_lib.o] Error 1
But then I did a make clean and ./configure && make and all was good.
If that doesn't clear it for you, post the failure... I have a Debian
VM I can try if the problem persists.
More information about the unit