diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-06 20:00:25 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2019-05-29 20:02:57 +0200 |
commit | 8054cf970b5b56252c458593328761d54ae77483 (patch) | |
tree | 1a50d42e984199bbbae7a85272eb90913a69b0d3 /zebra/kernel_socket.c | |
parent | Merge pull request #4414 from opensourcerouting/feature/fix-isis-warnings (diff) | |
download | frr-8054cf970b5b56252c458593328761d54ae77483.tar.xz frr-8054cf970b5b56252c458593328761d54ae77483.zip |
zebra: fix unused variable on OmniOS
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to '')
-rw-r--r-- | zebra/kernel_socket.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 5f4bd3bbc..163e01db0 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -304,12 +304,13 @@ size_t rta_getattr(caddr_t sap, void *destp, size_t destlen) size_t rta_getsdlname(caddr_t sap, void *destp, short *destlen) { struct sockaddr_dl *sdl = (struct sockaddr_dl *)sap; - struct sockaddr *sa = (struct sockaddr *)sap; uint8_t *dest = destp; size_t tlen, copylen; copylen = sdl->sdl_nlen; #ifdef HAVE_STRUCT_SOCKADDR_SA_LEN + struct sockaddr *sa = (struct sockaddr *)sap; + tlen = (sa->sa_len == 0) ? sizeof(ROUNDUP_TYPE) : ROUNDUP(sa->sa_len); #else /* !HAVE_STRUCT_SOCKADDR_SA_LEN */ tlen = SAROUNDUP(sap); |