summaryrefslogtreecommitdiff
path: root/src/a2netcompat.h
diff options
context:
space:
mode:
authorTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-01-09 17:20:03 +0900
committerTatsuhiro Tsujikawa <tatsuhiro.t@gmail.com>2016-01-09 17:20:03 +0900
commite899eba76f7b8f91805176db4460f91e0a4dd487 (patch)
tree0c4a6a00bae4ce02f83819786be91aeb6351fab8 /src/a2netcompat.h
parentd2d06395d985c08aacf497a6ecc37d757ef990e0 (diff)
Define SockAddr and use it instead of raw std::pair
Diffstat (limited to 'src/a2netcompat.h')
-rw-r--r--src/a2netcompat.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/a2netcompat.h b/src/a2netcompat.h
index 2caa94c4..3d7c2d8f 100644
--- a/src/a2netcompat.h
+++ b/src/a2netcompat.h
@@ -115,6 +115,11 @@ union sockaddr_union {
sockaddr_in in;
};
+struct SockAddr {
+ sockaddr_union su;
+ socklen_t suLength;
+};
+
#define A2_DEFAULT_IOV_MAX 128
#if defined(IOV_MAX) && IOV_MAX < A2_DEFAULT_IOV_MAX