diff options
author | Brandon Casey <drafnel@gmail.com> | 2010-03-15 17:10:06 -0500 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2010-03-16 19:07:09 -0700 |
commit | 3aff874af239965ea78c37d14266d6c2233ad431 (patch) | |
tree | c2503bd97299663aecb3705f6dd64bea157d0814 /diffcore.h | |
parent | don't use default revision if a rev was specified (diff) | |
download | tgif-3aff874af239965ea78c37d14266d6c2233ad431.tar.xz |
daemon.c: avoid accessing ss_family member of struct sockaddr_storage
When NO_SOCKADDR_STORAGE is set for a platform, either sockaddr_in or
sockaddr_in6 is used intead. Neither of which has an ss_family member.
They have an sin_family and sin6_family member respectively. Since the
addrcmp() function accesses the ss_family member of a sockaddr_storage
struct, compilation fails on platforms which define NO_SOCKADDR_STORAGE.
Since any sockaddr_* structure can be cast to a struct sockaddr and
have its sa_family member read, do so here to workaround this issue.
Thanks to Martin Storsjö for pointing out the fix, and Gary Vaughan
for drawing attention to the issue.
Signed-off-by: Brandon Casey <casey@nrlssc.navy.mil>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'diffcore.h')
0 files changed, 0 insertions, 0 deletions