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 639252 - gsocket.c does not compile on Solaris 9 using GCC.
gsocket.c does not compile on Solaris 9 using GCC.
Status: RESOLVED DUPLICATE of bug 589989
Product: glib
Classification: Platform
Component: gio
2.24.x
Other Mac OS
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2011-01-11 21:03 UTC by Reid Madsen
Modified: 2011-01-12 00:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Patch for gsocket.c for Solaris 9 (648 bytes, application/octet-stream)
2011-01-11 21:03 UTC, Reid Madsen
Details

Description Reid Madsen 2011-01-11 21:03:39 UTC
Created attachment 178087 [details]
Patch for gsocket.c for Solaris 9

% uname -a
SunOS arcade 5.9 Generic_122300-13 sun4u sparc SUNW,Sun-Fire-V490 Solaris

% gcc --version
gcc (GCC) 4.2.4
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% ./configure --prefix=/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13 --build=sparc-sun-solaris2.9

% make

...

/bin/bash ../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I..  -DG_LOG_DOMAIN=\"GLib-GIO\" -I.. -I.. -I../glib -I../gmodule -DG_DISABLE_CAST_CHECKS -DG_THREADS_MANDATORY -DG_DISABLE_DEPRECATED -DGIO_COMPILATION -DGIO_MODULE_DIR=\"/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/lib/gio/modules\"  -I/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/include -I/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/libiconv/include -DG_DISABLE_SINGLE_INCLUDES -D_REENTRANT -D_PTHREADS  -O2 -I/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/include -I/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/libiconv/include -Wall -MT gsocket.lo -MD -MP -MF .deps/gsocket.Tpo -c -o gsocket.lo gsocket.c
gsocket.c: In function 'IA__g_socket_send_message':
gsocket.c:2681: warning: implicit declaration of function 'CMSG_SPACE'
gsocket.c:2690: warning: implicit declaration of function 'CMSG_LEN'

...

/bin/bash ../libtool  --tag=CC   --mode=link gcc  -O2 -I/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/include -I/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/libiconv/include -Wall  -L/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/lib -L/sea/compilers/native/gcc-4.2.4/V1.2/lib -L/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/libiconv/lib -o gio-querymodules gio-querymodules.o ../glib/libglib-2.0.la ../gobject/libgobject-2.0.la ../gmodule/libgmodule-2.0.la libgio-2.0.la  
libtool: link: gcc -O2 -I/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/include -I/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/libiconv/include -Wall -o .libs/gio-querymodules gio-querymodules.o  -L/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/lib -L/sea/compilers/native/gcc-4.2.4/V1.2/lib -L/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/libiconv/lib ../glib/.libs/libglib-2.0.so ../gobject/.libs/libgobject-2.0.so ../gmodule/.libs/libgmodule-2.0.so ./.libs/libgio-2.0.so /uadev/scm/rmadsen/sea/local/sparc-sunos-solaris-9/glib-2.24.2/gobject/.libs/libgobject-2.0.so /uadev/scm/rmadsen/sea/local/sparc-sunos-solaris-9/glib-2.24.2/gthread/.libs/libgthread-2.0.so -lpthread -lthread -lrt /uadev/scm/rmadsen/sea/local/sparc-sunos-solaris-9/glib-2.24.2/gmodule/.libs/libgmodule-2.0.so /uadev/scm/rmadsen/sea/local/sparc-sunos-solaris-9/glib-2.24.2/glib/.libs/libglib-2.0.so -lresolv -lz -Wl,-rpath -Wl,/uadev/scm/rmadsen/sea/local/install/sparc-sunos-solaris-9/versions/3.0.0.13/lib
./.libs/libgio-2.0.so: undefined reference to `CMSG_LEN'
./.libs/libgio-2.0.so: undefined reference to `CMSG_SPACE'
collect2: ld returned 1 exit status


The issue here is that the CMSG_LEN and CMSG_SPACE macros are not defined in /usr/include/sys/socket.h on all systems.  However, all the functions/macros that these CMSG_LEN and CMSG_SPACE are defined.  Thus, my solution to the problem was to conditionally define these two macros in gsocket.c.  Probably not a good long term solution, but it works...
Comment 1 Dan Winship 2011-01-12 00:07:43 UTC
2.24 is an old version. This has been fixed for a year now.

*** This bug has been marked as a duplicate of bug 589989 ***