Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(304)

Side by Side Diff: fusl/src/network/recvmsg.c

Issue 1730723002: [fusl] Remove socketcall abstraction (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « fusl/src/network/recvfrom.c ('k') | fusl/src/network/sendmsg.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #include <sys/socket.h> 1 #include <sys/socket.h>
2 #include <limits.h> 2 #include <limits.h>
3 #include "syscall.h" 3 #include "syscall.h"
4 #include "libc.h" 4 #include "libc.h"
5 5
6 ssize_t recvmsg(int fd, struct msghdr* msg, int flags) { 6 ssize_t recvmsg(int fd, struct msghdr* msg, int flags) {
7 ssize_t r; 7 ssize_t r;
8 #if LONG_MAX > INT_MAX 8 #if LONG_MAX > INT_MAX
9 struct msghdr h, *orig = msg; 9 struct msghdr h, *orig = msg;
10 if (msg) { 10 if (msg) {
11 h = *msg; 11 h = *msg;
12 h.__pad1 = h.__pad2 = 0; 12 h.__pad1 = h.__pad2 = 0;
13 msg = &h; 13 msg = &h;
14 } 14 }
15 #endif 15 #endif
16 r = socketcall_cp(recvmsg, fd, msg, flags, 0, 0, 0); 16 r = syscall_cp(SYS_recvmsg, fd, msg, flags, 0, 0, 0);
17 #if LONG_MAX > INT_MAX 17 #if LONG_MAX > INT_MAX
18 if (orig) 18 if (orig)
19 *orig = h; 19 *orig = h;
20 #endif 20 #endif
21 return r; 21 return r;
22 } 22 }
OLDNEW
« no previous file with comments | « fusl/src/network/recvfrom.c ('k') | fusl/src/network/sendmsg.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698