build: set `process.platform` to "sunos" on SunOS
authorNathan Rajlich <nathan@tootallnate.net>
Wed, 29 Aug 2012 21:57:25 +0000 (14:57 -0700)
committerNathan Rajlich <nathan@tootallnate.net>
Wed, 29 Aug 2012 23:12:59 +0000 (16:12 -0700)
gyp sets it to "solaris" by default, but versions of node v0.6.x and
older would report "sunos". Let's keep things consistent.

Fixes #3944.

node.gyp

index 84ec69d..82af2fe 100644 (file)
--- a/node.gyp
+++ b/node.gyp
             '-lkstat',
             '-lumem',
           ],
+          'defines!': [
+            'PLATFORM="solaris"',
+          ],
+          'defines': [
+            # we need to use node's preferred "sunos"
+            # rather than gyp's preferred "solaris"
+            'PLATFORM="sunos"',
+          ],
         }],
       ],
       'msvs-settings': {