diff --git a/libc/include/sys/socket.h b/libc/include/sys/socket.h index f33f112fc..41c5a9ad2 100644 --- a/libc/include/sys/socket.h +++ b/libc/include/sys/socket.h @@ -116,22 +116,7 @@ struct cmsghdr { ? (struct cmsghdr*) (msg)->msg_control : (struct cmsghdr*) NULL) #define CMSG_OK(mhdr, cmsg) ((cmsg)->cmsg_len >= sizeof(struct cmsghdr) && (cmsg)->cmsg_len <= (unsigned long) ((mhdr)->msg_controllen - ((char*)(cmsg) - (char*)(mhdr)->msg_control))) -#if __ANDROID_API__ >= 21 struct cmsghdr* __cmsg_nxthdr(struct msghdr* __msg, struct cmsghdr* __cmsg) __INTRODUCED_IN(21); -#else -/* TODO(danalbert): Move this into libandroid_support. */ -static inline struct cmsghdr* __cmsg_nxthdr(struct msghdr* msg, struct cmsghdr* cmsg) { - struct cmsghdr* ptr = - __BIONIC_CAST(reinterpret_cast, struct cmsghdr*, - (__BIONIC_CAST(reinterpret_cast, char*, cmsg) + CMSG_ALIGN(cmsg->cmsg_len))); - size_t len = __BIONIC_CAST(reinterpret_cast, char*, ptr + 1) - - __BIONIC_CAST(reinterpret_cast, char*, msg->msg_control); - if (len > msg->msg_controllen) { - return NULL; - } - return ptr; -} -#endif #define SCM_RIGHTS 0x01 #define SCM_CREDENTIALS 0x02