diff --git a/toolkit/moz.configure b/toolkit/moz.configure
index 026e7fa..d27b07f 100644
--- a/toolkit/moz.configure
+++ b/toolkit/moz.configure
@@ -1815,7 +1815,7 @@ with only_when(compile_environment):
         if target.kernel == "Darwin":
             if target.cpu == "x86":
                 return ("-DPIC", "-DMACHO")
-            elif target.cpu == "x86_64":
+            elif target.cpu == "x86_64" and target.kernel != 'SunOS':
                 return ("-D__x86_64__", "-DPIC", "-DMACHO")
         elif target.kernel == "WINNT":
             if target.cpu == "x86":