diff --git a/core/c/jbigi/mbuild_jbigi.sh b/core/c/jbigi/mbuild_jbigi.sh
index 1e262a6031a5eae1e4721be5d113d5bf05b5d74b..8359de1378cca7cb61522358d3a37907e0340716 100755
--- a/core/c/jbigi/mbuild_jbigi.sh
+++ b/core/c/jbigi/mbuild_jbigi.sh
@@ -23,6 +23,12 @@ Darwin*)
         INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include"
         LINKFLAGS="-dynamiclib -framework JavaVM"
         LIBFILE="libjbigi.jnilib";;
+SunOS*)
+        COMPILEFLAGS="-fPIC -Wall"
+        INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include -I$JAVA_HOME/include/solaris"
+        LINKFLAGS="-shared -Wl,-soname,libjbigi.so"
+        LIBFILE="libjbigi.so";;
+
 *)
 	COMPILEFLAGS="-fPIC -Wall"
 	INCLUDES="-I. -I../../jbigi/include -I$JAVA_HOME/include -I$JAVA_HOME/include/linux"
diff --git a/core/c/jcpuid/build.sh b/core/c/jcpuid/build.sh
index 8d14ac692e8afe6d29d2112108c82456ec86bf56..836ea73d0fc5c0d33c8bc3aba9a6ca591cab4951 100755
--- a/core/c/jcpuid/build.sh
+++ b/core/c/jcpuid/build.sh
@@ -3,6 +3,8 @@
 case `uname -sr` in
 MINGW*)
 	echo "Building windows .dll's";;
+SunOS*)
+	echo "Building solaris .so's";;
 CYGWIN*)
 	echo "Building windows .dll's";;
 Linux*)
@@ -31,6 +33,11 @@ MINGW*)
 	INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/win32/"
 	LINKFLAGS="-shared -static -static-libgcc -Wl,--kill-at"
 	LIBFILE="lib/freenet/support/CPUInformation/jcpuid-x86-windows.dll";;
+SunOS*)
+        COMPILEFLAGS="-Wall"
+        INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/solaris/"
+        LINKFLAGS="-shared -static -Wl,-soname,libjcpuid-x86-solaris.so"
+        LIBFILE="lib/freenet/support/CPUInformation/libjcpuid-x86-solaris.so";;
 FreeBSD*)
 	COMPILEFLAGS="-Wall"
 	INCLUDES="-I. -Iinclude -I$JAVA_HOME/include/ -I$JAVA_HOME/include/freebsd/"
diff --git a/core/java/src/freenet/support/CPUInformation/CPUID.java b/core/java/src/freenet/support/CPUInformation/CPUID.java
index 65df8ea4f7e36f8f20416f1da2496429136366b8..ae4a8846756b9468470a601c383b030ecb60cbf6 100644
--- a/core/java/src/freenet/support/CPUInformation/CPUID.java
+++ b/core/java/src/freenet/support/CPUInformation/CPUID.java
@@ -52,6 +52,7 @@ public class CPUID {
     private static final boolean isWindows = System.getProperty("os.name").toLowerCase().contains("windows");
     private static final boolean isLinux = System.getProperty("os.name").toLowerCase().contains("linux");
     private static final boolean isFreebsd = System.getProperty("os.name").toLowerCase().contains("freebsd");
+    private static final boolean isSunos = System.getProperty("os.name").toLowerCase().contains("sunos");
     
     /**
      * This isn't always correct.
@@ -719,6 +720,8 @@ public class CPUID {
              return "jcpuid-x86-windows"; // The convention on Windows
         if(isFreebsd)
             return "jcpuid-x86-freebsd"; // The convention on freebsd...
+	if(isSunos)
+	    return "jcpuid-x86-solaris"; // The convention on SunOS
         //throw new RuntimeException("Dont know jcpuid library name for os type '"+System.getProperty("os.name")+"'");
         // use linux as the default, don't throw exception
         return "jcpuid-x86-linux";
@@ -730,6 +733,8 @@ public class CPUID {
              return "jcpuid-x86_64-windows";
         if(isFreebsd)
             return "jcpuid-x86_64-freebsd";
+	if(isSunos)
+	    return "jcpuid-x86_64-solaris";
         // use linux as the default, don't throw exception
         return "jcpuid-x86_64-linux";
     }