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

Unified Diff: third_party/libevent/test/test-weof.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-weof.c
diff --git a/third_party/libevent/test/test-weof.c b/third_party/libevent/test/test-weof.c
index 5d87ceb8eb7797d2559cef9270d11684852b6060..7fd6c8b1f966db513620799e8a44ad7ba5810e50 100644
--- a/third_party/libevent/test/test-weof.c
+++ b/third_party/libevent/test/test-weof.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
@@ -21,7 +23,9 @@
#include <stdio.h>
#include <string.h>
#include <signal.h>
+#ifdef HAVE_UNISTD_H
#include <unistd.h>
+#endif
#include <errno.h>
#include <event.h>
@@ -37,7 +41,7 @@ write_cb(int fd, short event, void *arg)
const char *test = "test string";
int len;
- len = write(fd, test, strlen(test) + 1);
+ len = send(fd, test, strlen(test) + 1, 0);
printf("%s: write %d%s\n", __func__,
len, len ? "" : " - means EOF");
@@ -45,7 +49,7 @@ write_cb(int fd, short event, void *arg)
if (len > 0) {
if (!called)
event_add(arg, NULL);
- close(pair[0]);
+ EVUTIL_CLOSESOCKET(pair[0]);
} else if (called == 1)
test_okay = 0;
« third_party/libevent/chromium.patch ('K') | « third_party/libevent/test/test-time.c ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698