summaryrefslogtreecommitdiffstats
path: root/lmkd
diff options
context:
space:
mode:
authorErik Kline <ek@google.com>2015-12-08 04:54:05 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-12-08 04:54:05 +0000
commit79a3210eda7060735b25579eea49602bceee8ac4 (patch)
treed0ccf28577c86e68b41ac3ccd60cc75fb3ba3654 /lmkd
parentb6058e448970cabf7c279f04ebfa7156cec3610f (diff)
parentcbc6f68e320bd30d0cd7fbe73847deacbd54e073 (diff)
downloadcore-79a3210eda7060735b25579eea49602bceee8ac4.tar.gz
core-79a3210eda7060735b25579eea49602bceee8ac4.tar.bz2
core-79a3210eda7060735b25579eea49602bceee8ac4.zip
Merge "Switch from using sockaddr to sockaddr_storage." am: 46b0b1c694 am: 4c1b3840f0
am: cbc6f68e32 * commit 'cbc6f68e320bd30d0cd7fbe73847deacbd54e073': Switch from using sockaddr to sockaddr_storage.
Diffstat (limited to 'lmkd')
-rw-r--r--lmkd/lmkd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/lmkd/lmkd.c b/lmkd/lmkd.c
index cb9598e75..ebcebd642 100644
--- a/lmkd/lmkd.c
+++ b/lmkd/lmkd.c
@@ -397,7 +397,8 @@ static void ctrl_data_handler(uint32_t events) {
}
static void ctrl_connect_handler(uint32_t events __unused) {
- struct sockaddr addr;
+ struct sockaddr_storage ss;
+ struct sockaddr *addrp = (struct sockaddr *)&ss;
socklen_t alen;
struct epoll_event epev;
@@ -406,8 +407,8 @@ static void ctrl_connect_handler(uint32_t events __unused) {
ctrl_dfd_reopened = 1;
}
- alen = sizeof(addr);
- ctrl_dfd = accept(ctrl_lfd, &addr, &alen);
+ alen = sizeof(ss);
+ ctrl_dfd = accept(ctrl_lfd, addrp, &alen);
if (ctrl_dfd < 0) {
ALOGE("lmkd control socket accept failed; errno=%d", errno);