After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 668468 - 'IP_ADD_SOURCE_MEMBERSHIP' undeclared
'IP_ADD_SOURCE_MEMBERSHIP' undeclared
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: build
2.31.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2012-01-23 02:59 UTC by Ryan Schmidt
Modified: 2012-02-08 12:29 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
GSocket: fix complile on platforms without source-specific multicast (3.40 KB, patch)
2012-01-24 13:32 UTC, Dan Winship
reviewed Details | Review

Description Ryan Schmidt 2012-01-23 02:59:07 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.
Comment 1 Dan Winship 2012-01-23 14:03:53 UTC
This is fixed in 2.31.12 which went out on Friday.
Comment 2 Ryan Schmidt 2012-01-24 00:06:45 UTC
I'm afraid the issue remains with 2.31.12.
Comment 3 Dan Winship 2012-01-24 13:32:09 UTC
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.)
Comment 4 Dan Winship 2012-01-24 13:32:45 UTC
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.
Comment 5 Colin Walters 2012-02-07 23:47:58 UTC
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.
Comment 6 Dan Winship 2012-02-08 12:29:23 UTC
(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.