about summary refs log tree commit homepage
diff options
context:
space:
mode:
-rw-r--r--ext/mwrap/httpd.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/ext/mwrap/httpd.h b/ext/mwrap/httpd.h
index 03aef9f..da7ff6d 100644
--- a/ext/mwrap/httpd.h
+++ b/ext/mwrap/httpd.h
@@ -43,6 +43,14 @@
 #define TYPE_CSV "text/csv"
 #define TYPE_PLAIN "text/plain"
 
+/*
+ * C ruby defines snprintf to ruby_snprintf, we can't have that in
+ * non-ruby processes spawned by C ruby
+ */
+#if MWRAP_RUBY && defined(snprintf)
+#        undef snprintf
+#endif
+
 enum mw_qev {
         MW_QEV_IGNORE = 0,
         MW_QEV_RD = POLLIN,