oh, right.
reading your reply, I re-discovered my local fix I use for the
SFE packaging project:
==
#fix unlucky selection of name for struct (introduced in some 3.4.x
version)
grep "struct sockaddr_un sun;" src/util/unix_dgram_connect.c \
&& gsed -i.bak_undef_sun -e '/struct sockaddr_un sun;/ i\
#undef sun' src/util/unix_dgram_connect.c
==
@tomww
On Mon, Apr 01, 2019 at 06:52:20PM +0300, Andrew Evdokimov wrote:
> On 01/04/2019 14:14, Wietse Venema wrote:
> > > unix_dgram_connect.c: In function 'unix_dgram_connect':
> > > unix_dgram_connect.c:63:24: error: expected identifier or '(' before
> > > numeric constant
> > > struct sockaddr_un sun;
> > > ^
> >
> > Any idea why identical code in src/util/unix_listen.c compiles
> > without error?
>
> Because it undefs 'sun' macro while unix_dgram_connect.c does not.
>
> ...
> int unix_connect(const char *addr, int block_mode, int timeout)
> {
> #undef sun
> struct sockaddr_un sun;
> ...
>
> builder@builder2:~$ gcc -dM -E - < /dev/null | grep sun
> #define __sun 1
> #define sun 1
> #define __sun__ 1
> builder@builder2:~$ uname -a
> SunOS builder2 5.11 11.4.5.3.0 i86pc i386 i86pc
>
>
> --
> Andrew Evdokimov
> +7 910 450 83 33
> mail [email protected]
> xmpp [email protected]
--