Skip to content

Instantly share code, notes, and snippets.

@bnoordhuis
Created June 19, 2012 20:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bnoordhuis/e94c0e963e1779239b60 to your computer and use it in GitHub Desktop.
Save bnoordhuis/e94c0e963e1779239b60 to your computer and use it in GitHub Desktop.
diff --git a/src/ev-emul.h b/src/ev-emul.h
index ee85db1..4355b4e 100644
--- a/src/ev-emul.h
+++ b/src/ev-emul.h
@@ -30,6 +30,10 @@
#include <stdint.h>
#include <string.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#undef ev_init
#undef ev_set_cb
#undef ev_set_priority
@@ -248,4 +252,8 @@ inline static void __ev_unref(void) {
#undef __uv_container_of
#undef __uv_warn_of
+#ifdef __cplusplus
+}
+#endif
+
#endif /* NODE_EV_EMUL_H_ */
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment