aboutsummaryrefslogtreecommitdiffstats
path: root/ext/socket/rubysocket.h
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r--ext/socket/rubysocket.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 5dca68a198..867e215273 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -4,6 +4,16 @@
#include "ruby/config.h"
#include RUBY_EXTCONF_H
+#ifdef __sun
+/* (Recent?) Solaris' <nfs/nfs.h> have conflicting definition of T_DATA. Let
+ * us honour system definition by undefining ours.
+ *
+ * See also [ruby-core:4261]
+ */
+# include "ruby/ruby.h"
+# undef T_DATA
+#endif
+
#include <errno.h>
#include <stdio.h>