diff -u -r -N gt5.2.1-all-source-installer.orig/source-trees/gram/jobmanager/source/configure gt5.2.1-all-source-installer/source-trees/gram/jobmanager/source/configure
--- gt5.2.1-all-source-installer.orig/source-trees/gram/jobmanager/source/configure	2011-12-15 09:22:58.000000000 -0500
+++ gt5.2.1-all-source-installer/source-trees/gram/jobmanager/source/configure	2011-12-15 09:29:50.000000000 -0500
@@ -11628,6 +11628,17 @@
 
 fi
 
+case $host in
+       *solaris*)
+           $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
+
+           $as_echo "#define _XOPEN_SOURCE 1" >>confdefs.h
+
+           $as_echo "#define _XOPEN_SOURCE_EXTENDED 1" >>confdefs.h
+
+       ;;
+esac
+
  if test "$xml_catalog_path" != "notset"; then
   GENERATE_MANPAGES_TRUE=
   GENERATE_MANPAGES_FALSE='#'
diff -u -r -N gt5.2.1-all-source-installer.orig/source-trees/gram/jobmanager/source/configure.in gt5.2.1-all-source-installer/source-trees/gram/jobmanager/source/configure.in
--- gt5.2.1-all-source-installer.orig/source-trees/gram/jobmanager/source/configure.in	2011-11-28 12:29:01.000000000 -0500
+++ gt5.2.1-all-source-installer/source-trees/gram/jobmanager/source/configure.in	2011-12-15 09:27:57.000000000 -0500
@@ -55,6 +55,15 @@
     AC_DEFINE(HAVE_LIBXML2)
 fi
 
+dnl Some preprocessor tricks to get CMSG_SPACE and co. defined in <sys/socket.h>
+case $host in
+       *solaris*)
+           AC_DEFINE(__EXTENSIONS__)
+           AC_DEFINE(_XOPEN_SOURCE)
+           AC_DEFINE(_XOPEN_SOURCE_EXTENDED)
+       ;;
+esac
+
 AM_CONDITIONAL([GENERATE_MANPAGES], [test "$xml_catalog_path" != "notset"])
 AC_DEFINE_UNQUOTED(GLOBUS_FLAVOR_NAME, "$GLOBUS_FLAVOR_NAME")
 
diff -u -r -N gt5.2.1-all-source-installer.orig/source-trees/gridftp/client/source/globus_ftp_client_restart_plugin.c gt5.2.1-all-source-installer/source-trees/gridftp/client/source/globus_ftp_client_restart_plugin.c
--- gt5.2.1-all-source-installer.orig/source-trees/gridftp/client/source/globus_ftp_client_restart_plugin.c	2011-05-19 00:03:43.000000000 -0400
+++ gt5.2.1-all-source-installer/source-trees/gridftp/client/source/globus_ftp_client_restart_plugin.c	2011-12-15 12:25:00.000000000 -0500
@@ -838,6 +838,8 @@
 }
 /* globus_l_ftp_client_restart_plugin_mlst() */
 
+static
+void
 globus_l_ftp_client_restart_plugin_stat(
     globus_ftp_client_plugin_t *		plugin,
     void *					plugin_specific,
diff -u -r -N gt5.2.1-all-source-installer.orig/source-trees/gssapi-openssh/openssh/openbsd-compat/openbsd-compat.h gt5.2.1-all-source-installer/source-trees/gssapi-openssh/openssh/openbsd-compat/openbsd-compat.h
--- gt5.2.1-all-source-installer.orig/source-trees/gssapi-openssh/openssh/openbsd-compat/openbsd-compat.h	2011-03-22 16:10:32.000000000 -0400
+++ gt5.2.1-all-source-installer/source-trees/gssapi-openssh/openssh/openbsd-compat/openbsd-compat.h	2011-12-15 09:33:03.000000000 -0500
@@ -193,7 +193,7 @@
 long long strtonum(const char *, long long, long long, const char **);
 #endif
 
-#if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF)
+#if !defined(HAVE_VASPRINTF) || !defined(HAVE_VSNPRINTF) || defined(__sun)
 # include <stdarg.h>
 #endif
 

