diff options
author | Igor Pashev <pashev.igor@gmail.com> | 2014-04-03 17:13:27 +0400 |
---|---|---|
committer | Igor Pashev <pashev.igor@gmail.com> | 2014-04-03 17:13:27 +0400 |
commit | 2657d3f4862f0e2dc6800aed7759c7cdd05c14eb (patch) | |
tree | da271e730d13ef449f2488c14d19c8f2605b377c | |
parent | 06524515cb36cb7ebb9eeaf8b6445198ef80beb9 (diff) | |
download | illumos-packaging-2657d3f4862f0e2dc6800aed7759c7cdd05c14eb.tar.gz |
Implemented accept through the old syscall
-rw-r--r-- | libc/debian/changelog | 2 | ||||
-rw-r--r-- | libc/debian/control | 2 | ||||
-rw-r--r-- | libc/debian/libc1-illumos-i386.symbols | 1 | ||||
-rw-r--r-- | libc/debian/libc1.symbols.illumos-amd64 | 1 | ||||
-rw-r--r-- | libc/debian/patches/libc-accept.patch | 93 | ||||
-rw-r--r-- | libc/debian/patches/series | 1 |
6 files changed, 99 insertions, 1 deletions
diff --git a/libc/debian/changelog b/libc/debian/changelog index 13ae3dc..b7c0779 100644 --- a/libc/debian/changelog +++ b/libc/debian/changelog @@ -19,6 +19,8 @@ libc (4.3) UNRELEASED; urgency=medium * New package libc-manpages with libc manpages * Backported 4688 getlogin_r shouldn't clobber memory (illumos-4688-getlogin_r.patch) * Implemented pipe through the real syscall, not pipe2 (libc-pipe.patch) + * Implemented accept through the old syscall, accept4 through the new + accept4 syscall (libc-accept.patch) -- Igor Pashev <pashev.igor@gmail.com> Sun, 02 Mar 2014 22:53:31 +0400 diff --git a/libc/debian/control b/libc/debian/control index 65d52b9..1c17365 100644 --- a/libc/debian/control +++ b/libc/debian/control @@ -15,7 +15,7 @@ Build-Depends: m4, onbld, symlinks, - uts-dev ( >= 4.3 ), + uts-dev ( >= 4.3+2 ), Standards-Version: 3.9.5 Homepage: http://illumos.org/ diff --git a/libc/debian/libc1-illumos-i386.symbols b/libc/debian/libc1-illumos-i386.symbols index f47e1d0..20759dd 100644 --- a/libc/debian/libc1-illumos-i386.symbols +++ b/libc/debian/libc1-illumos-i386.symbols @@ -754,6 +754,7 @@ libc.so.1 libc1-illumos-i386 #MINVER# _sleep@SYSVABI_1.3 2.10-1 _smbuf@SUNWprivate_1.1 2.10-1 _snprintf_c89@SUNWprivate_1.1 2.10-1 + _so_accept4@DYSON_1 4.3 _so_accept@SUNWprivate_1.1 2.10-1 _so_bind@SUNWprivate_1.1 2.10-1 _so_connect@SUNWprivate_1.1 2.10-1 diff --git a/libc/debian/libc1.symbols.illumos-amd64 b/libc/debian/libc1.symbols.illumos-amd64 index cf7ded5..c80d44e 100644 --- a/libc/debian/libc1.symbols.illumos-amd64 +++ b/libc/debian/libc1.symbols.illumos-amd64 @@ -728,6 +728,7 @@ libc.so.1 libc1 #MINVER# _sigsuspend@SUNW_0.7 2.10-1 _sleep@SUNW_0.7 2.10-1 _smbuf@SUNWprivate_1.1 2.10-1 + _so_accept4@DYSON_1 4.3 _so_accept@SUNWprivate_1.1 2.10-1 _so_bind@SUNWprivate_1.1 2.10-1 _so_connect@SUNWprivate_1.1 2.10-1 diff --git a/libc/debian/patches/libc-accept.patch b/libc/debian/patches/libc-accept.patch new file mode 100644 index 0000000..2d28208 --- /dev/null +++ b/libc/debian/patches/libc-accept.patch @@ -0,0 +1,93 @@ +Index: libc/usr/src/lib/libc/common/sys/_so_accept.s +=================================================================== +--- libc.orig/usr/src/lib/libc/common/sys/_so_accept.s 2014-03-01 16:18:11.000000000 +0400 ++++ libc/usr/src/lib/libc/common/sys/_so_accept.s 2014-04-03 15:11:34.941679423 +0400 +@@ -33,8 +33,8 @@ + + /* C library -- __so_accept */ + /* +- * int __so_accept(int sock, struct sockaddr *addr, int *addrlen, int vers, +- * int flags) ++ * int __so_accept(int sock, struct sockaddr *addr, int *addrlen, int vers) ++ * int __so_accept4(int sock, struct sockaddr *addr, int *addrlen, int vers, int flags) + */ + + #include "SYS.h" +@@ -42,3 +42,7 @@ + SYSCALL2_RVAL1(__so_accept,accept) + RET + SET_SIZE(__so_accept) ++ ++ SYSCALL2_RVAL1(__so_accept4,accept4) ++ RET ++ SET_SIZE(__so_accept4) +Index: libc/usr/src/lib/libc/port/threads/scalls.c +=================================================================== +--- libc.orig/usr/src/lib/libc/port/threads/scalls.c 2014-04-03 10:50:29.980299122 +0400 ++++ libc/usr/src/lib/libc/port/threads/scalls.c 2014-04-03 15:12:54.000556865 +0400 +@@ -1024,13 +1024,22 @@ + } + + int +-_so_accept(int sock, struct sockaddr *addr, uint_t *addrlen, int version, ++_so_accept(int sock, struct sockaddr *addr, uint_t *addrlen, int version) ++{ ++ extern int __so_accept(int, struct sockaddr *, uint_t *, int); ++ int rv; ++ ++ PERFORM(__so_accept(sock, addr, addrlen, version)) ++} ++ ++int ++_so_accept4(int sock, struct sockaddr *addr, uint_t *addrlen, int version, + int flags) + { +- extern int __so_accept(int, struct sockaddr *, uint_t *, int, int); ++ extern int __so_accept4(int, struct sockaddr *, uint_t *, int, int); + int rv; + +- PERFORM(__so_accept(sock, addr, addrlen, version, flags)) ++ PERFORM(__so_accept4(sock, addr, addrlen, version, flags)) + } + + int +Index: libc/usr/src/lib/libsocket/socket/weaks.c +=================================================================== +--- libc.orig/usr/src/lib/libsocket/socket/weaks.c 2014-04-03 10:50:46.271670133 +0400 ++++ libc/usr/src/lib/libsocket/socket/weaks.c 2014-04-03 15:25:55.056118010 +0400 +@@ -61,6 +61,7 @@ + extern int _so_bind(); + extern int _so_listen(); + extern int _so_accept(); ++extern int _so_accept4(); + extern int _so_connect(); + extern int _so_shutdown(); + extern int _so_recv(); +@@ -93,13 +94,13 @@ + int + _accept(int sock, struct sockaddr *addr, int *addrlen) + { +- return (_so_accept(sock, addr, addrlen, SOV_DEFAULT, 0)); ++ return (_so_accept(sock, addr, addrlen, SOV_DEFAULT)); + } + + int + _accept4(int sock, struct sockaddr *addr, int *addrlen, int flags) + { +- return (_so_accept(sock, addr, addrlen, SOV_DEFAULT, flags)); ++ return (_so_accept4(sock, addr, addrlen, SOV_DEFAULT, flags)); + } + + int +Index: libc/usr/src/lib/libc/port/mapfile-vers +=================================================================== +--- libc.orig/usr/src/lib/libc/port/mapfile-vers 2014-04-03 10:50:48.920489683 +0400 ++++ libc/usr/src/lib/libc/port/mapfile-vers 2014-04-03 15:29:38.052488239 +0400 +@@ -120,6 +120,7 @@ + + SYMBOL_VERSION DYSON_1 { + global: ++ _so_accept4; + cfmakeraw; + error; + error_at_line; diff --git a/libc/debian/patches/series b/libc/debian/patches/series index e0c008c..8a4040c 100644 --- a/libc/debian/patches/series +++ b/libc/debian/patches/series @@ -103,3 +103,4 @@ syslog-names.patch syslog-LOG_PERROR.patch illumos-4688-getlogin_r.patch libc-pipe.patch +libc-accept.patch |