luaa: define SUN_LEN if not defined
Signed-off-by: Julien Danjou <julien@danjou.info>
This commit is contained in:
parent
74cff05428
commit
c2765f370e
5
luaa.c
5
luaa.c
|
@ -1219,6 +1219,11 @@ luaA_cs_init(void)
|
|||
|
||||
addr = socket_getaddr(getenv("DISPLAY"));
|
||||
|
||||
/* Needed for some OSes like Solaris */
|
||||
#ifndef SUN_LEN
|
||||
#define SUN_LEN(ptr) ((size_t) (((struct sockaddr_un *) 0)->sun_path) + strlen ((ptr)->sun_path))
|
||||
#endif
|
||||
|
||||
if(bind(csfd, (const struct sockaddr *) addr, SUN_LEN(addr)))
|
||||
{
|
||||
if(errno == EADDRINUSE)
|
||||
|
|
Loading…
Reference in New Issue