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

Unified Diff: third_party/libevent/nacl_nonsfi/signal_stub.c

Issue 1128733002: Update from https://crrev.com/328418 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 5 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/libevent/libevent_nacl_nonsfi.gyp ('k') | third_party/libxml/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libevent/nacl_nonsfi/signal_stub.c
diff --git a/third_party/libevent/nacl_nonsfi/signal_stub.c b/third_party/libevent/nacl_nonsfi/signal_stub.c
new file mode 100644
index 0000000000000000000000000000000000000000..8049030ff328d5abc2e602d4e6e1ee7d4fdc4462
--- /dev/null
+++ b/third_party/libevent/nacl_nonsfi/signal_stub.c
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2015 The Chromium Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+/*
+ * In nacl_helper_nonsfi, socketpair() is unavailable. In libevent, it is used
+ * to notify of a signal handler invocation, which is unused in
+ * nacl_helper_nonsfi. Unfortunately, there is no macro to disable the feature,
+ * so we stub out the signal module entirely.
+ */
+
+
+#include <signal.h>
+#include <stdlib.h>
+#include <sys/queue.h>
+
+/* config.h must be included before any other libevent header is included. */
+#include "config.h"
+
+#include "third_party/libevent/event-internal.h"
+#include "third_party/libevent/event.h"
+#include "third_party/libevent/evsignal.h"
+
+
+struct event_base *evsignal_base = 0;
+
+int evsignal_init(struct event_base *base) {
+ /* Do nothing, and return success. */
+ return 0;
+}
+
+void evsignal_process(struct event_base *base) {
+}
+
+int evsignal_add(struct event *event) {
+ /* Do nothing, and return an error. */
+ return -1;
+}
+
+int evsignal_del(struct event *event) {
+ /* Do nothing, and return an error. */
+ return -1;
+}
+
+void evsignal_dealloc(struct event_base *base) {
+}
« no previous file with comments | « third_party/libevent/libevent_nacl_nonsfi.gyp ('k') | third_party/libxml/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698