Index: ext/socket/extconf.rb =================================================================== --- ext/socket/extconf.rb (revision 41241) +++ ext/socket/extconf.rb (working copy) @@ -294,6 +294,10 @@ end $INCFLAGS << " -I$(topdir) -I$(top_srcdir)" +if /darwin/ =~ RUBY_PLATFORM + $CFLAGS << " -D__APPLE_USE_RFC_3542" +end + headers = [] unless $mswin or $mingw headers = %w