[Live-devel] Compilation failure on cygwin (live-2007.01.11.tar.gz)

Shishir Birmiwal shishir at birmiwal.net
Tue Jan 16 04:37:25 PST 2007


Hi,

I sent a mail on the cygwin list
(http://cygwin.com/ml/cygwin/2007-01/msg00516.html) and they have
agreed to make a change for this. However, there is not commited date
for the change. In the meanwhile, it may make sense to use a compile
time #define to solve the problem.

I generated a list of predefines with the following:
$ touch foo.h
$ cpp -dM foo.h > predefines.txt
and I see that __CYGWIN__ and __CYGWIN32__ are both pre-defined.

Replacing the following between lines 462-480 would help.

// The source-specific join/leave operations require special setsockopt()
// commands, and a special structure (ip_mreq_source).  If the include files
// didn't define these, we do so here:
#if !defined(IP_ADD_SOURCE_MEMBERSHIP) || defined(__CYGWIN32__)
struct ip_mreq_source {
  struct  in_addr imr_multiaddr;  /* IP multicast address of group */
  struct  in_addr imr_sourceaddr; /* IP address of source */
  struct  in_addr imr_interface;  /* local IP address of interface */
};
#endif

#ifndef IP_ADD_SOURCE_MEMBERSHIP

#ifdef LINUX
#define IP_ADD_SOURCE_MEMBERSHIP   39
#define IP_DROP_SOURCE_MEMBERSHIP 40
#else
#define IP_ADD_SOURCE_MEMBERSHIP   25
#define IP_DROP_SOURCE_MEMBERSHIP 26
#endif

#endif

With this change, I was able to build the code successfully on cygwin
(1.5.23) and on linux [gcc version 3.2.3 20030502 (Red Hat Linux
3.2.3-52)]

Hope this helps.

Regards
Shishir


More information about the live-devel mailing list