diff options
author | Erik Kline <ek@google.com> | 2015-12-08 04:54:05 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2015-12-08 04:54:05 +0000 |
commit | 79a3210eda7060735b25579eea49602bceee8ac4 (patch) | |
tree | d0ccf28577c86e68b41ac3ccd60cc75fb3ba3654 /lmkd/lmkd.c | |
parent | b6058e448970cabf7c279f04ebfa7156cec3610f (diff) | |
parent | cbc6f68e320bd30d0cd7fbe73847deacbd54e073 (diff) | |
download | core-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/lmkd.c')
-rw-r--r-- | lmkd/lmkd.c | 7 |
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); |