summaryrefslogtreecommitdiffstats
path: root/libc/bionic/accept.cpp
diff options
context:
space:
mode:
authorSreeram Ramachandran <sreeram@google.com>2014-05-13 15:40:26 -0700
committerSreeram Ramachandran <sreeram@google.com>2014-05-14 11:10:22 -0700
commit8f0cd8aa22906c3e678738eeba20fc1a5c399b6c (patch)
tree38bbf429b63d34d1d339bcd02689e81f744ef53a /libc/bionic/accept.cpp
parent15c13bd6cc0ce44d8f083f75d0bfa926a88cc169 (diff)
downloadbionic-8f0cd8aa22906c3e678738eeba20fc1a5c399b6c.zip
bionic-8f0cd8aa22906c3e678738eeba20fc1a5c399b6c.tar.gz
bionic-8f0cd8aa22906c3e678738eeba20fc1a5c399b6c.tar.bz2
Mark sockets on accept().
(cherry picked from commit 58b1f3f6a30a660ad81637c2b50382c3d279243b) Change-Id: I5d09be413cf720fbed905f96313b007997ada76c
Diffstat (limited to 'libc/bionic/accept.cpp')
-rw-r--r--libc/bionic/accept.cpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/libc/bionic/accept.cpp b/libc/bionic/accept.cpp
new file mode 100644
index 0000000..46b4efc
--- /dev/null
+++ b/libc/bionic/accept.cpp
@@ -0,0 +1,22 @@
+/*
+ * Copyright (C) 2014 The Android Open Source Project
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+#include <private/NetdClient.h>
+#include <sys/socket.h>
+
+int accept(int sockfd, sockaddr* addr, socklen_t* addrlen) {
+ return __netdClientDispatch.accept(sockfd, addr, addrlen);
+}