Ticket #17 (closed defect: fixed)

Opened 3 months ago

Last modified 2 months ago

IPv6 doesn't (and shouldn't try to) compile under Cygwin

Reported by: raggi Assigned to: raggi
Priority: major Milestone: EventMachine "Framework"
Keywords: ip6 cygwin Cc:

Description

Reported in #eventmachine by [PQ3]RailWolf?.

g++ -I. -I. -I/usr/lib/ruby/1.8/i386-cygwin -I/home/em/eventmachine/ext -DHAVE_OPENSSL_SSL_H -DHAVE_OPENSSL_ERR_H  -DOS_UNIX
-DBUILD_FOR_RUBY -DWITH_SSL -g -O2    -c em.cpp
em.cpp: In function `sockaddr* name2address(const char*, int, int*, int*)':
em.cpp:1178: error: aggregate `sockaddr_in6 in6' has incomplete type and cannot be defined
em.cpp:1197: error: `AF_INET6' undeclared (first use this function)
em.cpp:1197: error: (Each undeclared identifier is reported only once for each function it appears in.)
make: *** [em.o] Error 1
setup.rb:655:in `command': system("make") failed (RuntimeError)
        from setup.rb:664:in `make'
        from setup.rb:1258:in `setup_dir_ext'
        from setup.rb:1532:in `__send__'
        from setup.rb:1532:in `traverse'
        from setup.rb:1549:in `dive_into'
        from setup.rb:1530:in `traverse'
        from setup.rb:1524:in `exec_task_traverse'
        from setup.rb:1519:in `each'
        from setup.rb:1519:in `exec_task_traverse'
        from setup.rb:1246:in `exec_setup'
        from setup.rb:996:in `exec_setup'
        from setup.rb:813:in `invoke'
        from setup.rb:773:in `invoke'
        from setup.rb:1578

Requires fix in extconf.

He was trying to use cygwin due to the lack of #popen on win32 native.

Change History

06/10/08 04:52:30 changed by raggi

  • keywords changed from ip6 to ip6 cygwin.
  • status changed from new to assigned.

06/10/08 05:00:20 changed by raggi

Patch from Bill Kelly on the topic:

Index: em.cpp
===================================================================
--- em.cpp      (revision 696)
+++ em.cpp      (working copy)
@@ -1175,7 +1175,9 @@
      // Return NULL if no resolution.

      static struct sockaddr_in in4;
+       #ifndef __CYGWIN__
      static struct sockaddr_in6 in6;
+       #endif
      struct hostent *hp;

      if (!server || !*server)
@@ -1192,7 +1194,7 @@
              return (struct sockaddr*)&in4;
      }

-       #ifdef OS_UNIX
+       #if defined(OS_UNIX) && !defined(__CYGWIN__)
      memset (&in6, 0, sizeof(in6));
      if (inet_pton (AF_INET6, server, in6.sin6_addr.s6_addr) > 0) {
              if (family)



===================================================================

06/30/08 20:00:49 changed by raggi

  • status changed from assigned to closed.
  • resolution set to fixed.

Committed to branches/raggi