--- /dev/null
+--- gcc/config/sparc/gmon-sol2.c Sun Sep 15 05:03:42 2002
++++ gcc/config/sparc/gmon-sol2.c Sat Jul 12 05:43:17 2003
+@@ -1,3 +1,4 @@
++#define PATH_MAX 254
+ /*-
+ * Copyright (c) 1991 The Regents of the University of California.
+ * All rights reserved.
+diff -ur libjava/configure gcc-3.3+/libjava/configure
+--- libjava/configure Tue May 13 17:18:14 2003
++++ libjava/configure Tue Jul 15 02:41:51 2003
+@@ -3331,6 +3331,10 @@
+ THREADLDFLAGS=-pthread
+ THREADSPEC=-lc_r
+ ;;
++ *-solaris*)
++ THREADLIBS=-lpthread -lsocket -lnsl -ldl
++ THREADSPEC=-lpthread -lsocket -lnsl -ldl
++ ;;
+ *)
+ THREADLIBS=-lpthread
+ THREADSPEC=-lpthread
+diff -ur libjava/configure.in gcc-3.3+/libjava/configure.in
+--- libjava/configure.in Fri Mar 28 15:42:56 2003
++++ libjava/configure.in Tue Jul 15 02:17:07 2003
+@@ -402,6 +402,10 @@
+ THREADLDFLAGS=-pthread
+ THREADSPEC=-lc_r
+ ;;
++ *-*-solaris*)
++ THREADLIBS=-lpthread -lsocket -lnsl -ldl
++ THREADSPEC=-lpthread -lsocket -lnsl -ldl
++ ;;
+ *)
+ THREADLIBS=-lpthread
+ THREADSPEC=-lpthread