GNOME Bugzilla – Bug 668468
'IP_ADD_SOURCE_MEMBERSHIP' undeclared
Last modified: 2012-02-08 12:29:23 UTC
Hi, I'm the maintainer of glib in MacPorts, trying to update our port for the development version of glib, but glib 2.31.12 and 2.31.10 fail to build on my OS X Snow Leopard x86_64 machine with this error: gsocket.c: In function 'g_socket_multicast_group_operation': gsocket.c:1937: error: 'IP_ADD_SOURCE_MEMBERSHIP' undeclared (first use in this function) gsocket.c:1937: error: (Each undeclared identifier is reported only once gsocket.c:1937: error: for each function it appears in.) gsocket.c:1937: error: 'IP_DROP_SOURCE_MEMBERSHIP' undeclared (first use in this function) gsocket.c: In function 'g_socket_multicast_group_operation': gsocket.c:1937: error: 'IP_ADD_SOURCE_MEMBERSHIP' undeclared (first use in this function) gsocket.c:1937: error: (Each undeclared identifier is reported only once gsocket.c:1937: error: for each function it appears in.) gsocket.c:1937: error: 'IP_DROP_SOURCE_MEMBERSHIP' undeclared (first use in this function) 2.31.8 built fine.
This is fixed in 2.31.12 which went out on Friday.
I'm afraid the issue remains with 2.31.12.
Oops, that was a different define I was thinking of. Fixed in git. (This only affects Snow Leopard and older. It already built fine on Lion.)
Created attachment 205977 [details] [review] GSocket: fix complile on platforms without source-specific multicast Some platforms don't have the source-specific multicast sockopts, and so would fail to compile. Fix that (and return an error if the caller tries to use source-specific). Also clarify the docs a bit.
Review of attachment 205977 [details] [review]: ::: gio/gsocket.c @@ +1936,3 @@ if (source_specific) + { +#ifdef IP_ADD_SOURCE_MEMBERSHIP Is this defined to be a define? Could it be an enum member instead? If so I think it'll need to be a configure.ac check.
(In reply to comment #5) > +#ifdef IP_ADD_SOURCE_MEMBERSHIP > > Is this defined to be a define? Could it be an enum member instead? I guess in theory, yes, but no one actually does that, and we already have another #ifdef for a sockopt in gsocket.c anyway.