diff options
Diffstat (limited to 'lib/vty.c')
-rw-r--r-- | lib/vty.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1924,11 +1924,11 @@ vty_serv_un (const char *path) memset (&serv, 0, sizeof (struct sockaddr_un)); serv.sun_family = AF_UNIX; strncpy (serv.sun_path, path, strlen (path)); -#ifdef HAVE_SUN_LEN +#ifdef HAVE_STRUCT_SOCKADDR_UN_SUN_LEN len = serv.sun_len = SUN_LEN(&serv); #else len = sizeof (serv.sun_family) + strlen (serv.sun_path); -#endif /* HAVE_SUN_LEN */ +#endif /* HAVE_STRUCT_SOCKADDR_UN_SUN_LEN */ ret = bind (sock, (struct sockaddr *) &serv, len); if (ret < 0) |