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

Unified Diff: third_party/libevent/test/test-eof.c

Issue 412006: posix: upgrade libevent from 1.4.7 to 1.4.13 (Closed)
Patch Set: better readme Created 11 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/libevent/test/test-eof.c
diff --git a/third_party/libevent/test/test-eof.c b/third_party/libevent/test/test-eof.c
index 4fc1a19f2241a10615ee7d4819d3f6142a444f23..3264a7b7cebbee39fe58100543b0d621a7baeb61 100644
--- a/third_party/libevent/test/test-eof.c
+++ b/third_party/libevent/test/test-eof.c
@@ -12,7 +12,9 @@
#endif
#include <sys/types.h>
#include <sys/stat.h>
+#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
+#endif
#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
#endif
@@ -20,7 +22,9 @@
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <errno.h>
#include <event.h>
@@ -35,7 +39,7 @@ read_cb(int fd, short event, void *arg)
char buf[256];
int len;
- len = read(fd, buf, sizeof(buf));
+ len = recv(fd, buf, sizeof(buf), 0);
printf("%s: read %d%s\n", __func__,
len, len ? "" : " - means EOF");
@@ -64,7 +68,7 @@ main (int argc, char **argv)
return (1);
- write(pair[0], test, strlen(test)+1);
+ send(pair[0], test, strlen(test)+1, 0);
shutdown(pair[0], SHUT_WR);
/* Initalize the event library */

Powered by Google App Engine
This is Rietveld 408576698