Index: bin/couchdb.tpl.in
--- bin/couchdb.tpl.in.orig	2012-03-28 21:34:12.000000000 +0200
+++ bin/couchdb.tpl.in	2012-04-07 09:44:39.000000000 +0200
@@ -27,7 +27,7 @@
 KILL=false
 LOCAL_CONFIG_DIR=%localconfdir%/local.d
 LOCAL_CONFIG_FILE=%localconfdir%/%localini%
-PID_FILE=%localstatedir%/run/couchdb/couchdb.pid
+PID_FILE=%localstatedir%/run/couchdb.pid
 RECURSED=false
 RESET_CONFIG=true
 RESPAWN_TIMEOUT=0
Index: src/couchdb/priv/couch_js/main.c
--- src/couchdb/priv/couch_js/main.c.orig	2012-03-28 21:34:12.000000000 +0200
+++ src/couchdb/priv/couch_js/main.c	2012-04-07 09:44:39.000000000 +0200
@@ -12,6 +12,10 @@
 
 #include "config.h"
 
+#ifndef JSCLASS_GLOBAL_FLAGS
+#define JSCLASS_GLOBAL_FLAGS 0
+#endif
+
 #if defined(SM185)
 #include "sm185.c"
 #elif defined(SM180)
