Page MenuHome GnuPG

libassuan: ce-server fails to compile on Darwin due to missing include
Closed, ResolvedPublic

Description

libassuan-2.0.1 fails to compile for me like this:

powerpc-apple-darwin8-gcc -DHAVE_CONFIG_H -I. -I..
-I/Library/Gentoo/usr/include -mcpu=G5 -mtune=G5 -O3 -pipe -Wall -Wcast-align
-Wshadow -Wstrict-prototypes -Wpointer-arith -MT ce-server.o -MD -MP -MF
.deps/ce-server.Tpo -c -o ce-server.o ce-server.c
In file included from ce-server.c:51:
common.h: In function ‘do_strconcat’:
common.h:265: warning: implicit declaration of function ‘stpcpy’
common.h:265: warning: incompatible implicit declaration of built-in function
‘stpcpy’
ce-server.c: In function ‘server’:
ce-server.c:1291: error: ‘fd_set’ undeclared (first use in this function)
ce-server.c:1291: error: (Each undeclared identifier is reported only once
ce-server.c:1291: error: for each function it appears in.)
ce-server.c:1291: error: expected ‘;’ before ‘rfds’
ce-server.c:1295: warning: implicit declaration of function ‘FD_ZERO’
ce-server.c:1295: error: ‘rfds’ undeclared (first use in this function)
ce-server.c:1296: warning: implicit declaration of function ‘FD_SET’
ce-server.c:1309: warning: implicit declaration of function ‘select’
ce-server.c:1311: warning: implicit declaration of function ‘FD_ISSET’
make[3]: *** [ce-server.o] Error 1

Adding the necessary sys/select.h include fixes the compilation process for me,
as done in the attached patch.

Details

Version
2.0.1