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 a...@elahi.ru
xmpp a...@elahi.ru

Reply via email to