Index: build/bin/makeInstall
--- build/bin/makeInstall.orig	2009-05-13 00:07:30 +0200
+++ build/bin/makeInstall	2009-05-13 21:55:28 +0200
@@ -273,9 +273,9 @@
 
     . package/makeInstall.${BLD_PRODUCT}
 
+    CHGRP="true chgrp"
+    CHOWN="true chown"
     if [ "$DRY_RUN" = 1 ] ; then
-        CHGRP="true chgrp"
-        CHOWN="true chown"
         CHMOD="true chmod"
         CP="true cp"
         GZIP="true gzip"
Index: build/config/config.FREEBSD
--- build/config/config.FREEBSD.orig	2009-05-13 00:07:30 +0200
+++ build/config/config.FREEBSD	2009-05-13 21:55:28 +0200
@@ -8,4 +8,4 @@
 #
 ###############################################################################
 
-. build/os/config.base
+. build/config/config.base
Index: build/make/make.gcc
--- build/make/make.gcc.orig	2009-05-13 00:07:30 +0200
+++ build/make/make.gcc	2009-05-13 21:55:28 +0200
@@ -211,16 +211,15 @@
 #
 #	Support for dynamically loadable modules is present in shared and static builds
 #
-ifneq			($(BLD_OS),VXWORKS)
+ifeq			($(BLD_OS),LINUX)
     _LIBS	    += -ldl
-
+endif
 ifeq 			($(BLD_FEATURE_FLOATING_POINT),1)
     _LIBS       += -lm
 endif
 ifeq 			($(BLD_FEATURE_AUTH_PAM),1)
     _LIBS       += -lpam
 endif
-endif
 
 #
 #	Using the standard C++ library. Default for products using C++ is to use their own C++ library to save space.
Index: src/include/mpr.h
--- src/include/mpr.h.orig	2009-05-13 00:07:45 +0200
+++ src/include/mpr.h	2009-05-13 21:55:28 +0200
@@ -71,6 +71,7 @@
     #include    <libgen.h>
     #include    <limits.h>
     #include    <netdb.h>
+    #include    <sys/socket.h>
     #include    <net/if.h>
     #include    <netinet/in.h>
     #include    <netinet/tcp.h>
@@ -95,7 +96,6 @@
     #include    <sys/resource.h>
     #include    <sys/sem.h>
     #include    <sys/shm.h>
-    #include    <sys/socket.h>
     #include    <sys/select.h>
     #include    <sys/time.h>
     #include    <sys/times.h>
@@ -115,7 +115,7 @@
     #define __USE_ISOC99 1
     #include    <math.h>
 #if !CYGWIN
-    #include    <values.h>
+    #include    <limits.h>
 #endif
 #endif
 #endif /* BLD_UNIX_LIKE */
Index: src/mpr/mprLib.c
--- src/mpr/mprLib.c.orig	2009-05-13 00:07:32 +0200
+++ src/mpr/mprLib.c	2009-05-13 21:55:28 +0200
@@ -1984,6 +1984,8 @@
 
 }
 #elif FREEBSD
+#include <sys/types.h>
+#include <sys/sysctl.h>
     {
         int     cmd[2];
         size_t  len;
Index: src/mpr/mprPcre.c
--- src/mpr/mprPcre.c.orig	2009-05-13 00:07:32 +0200
+++ src/mpr/mprPcre.c	2009-05-13 21:55:28 +0200
@@ -72,6 +72,7 @@
     #include    <libgen.h>
     #include    <limits.h>
     #include    <netdb.h>
+    #include    <sys/socket.h>
     #include    <net/if.h>
     #include    <netinet/in.h>
     #include    <netinet/tcp.h>
@@ -96,7 +97,6 @@
     #include    <sys/resource.h>
     #include    <sys/sem.h>
     #include    <sys/shm.h>
-    #include    <sys/socket.h>
     #include    <sys/select.h>
     #include    <sys/time.h>
     #include    <sys/times.h>
@@ -116,7 +116,7 @@
     #define __USE_ISOC99 1
     #include    <math.h>
 #if !CYGWIN
-    #include    <values.h>
+    #include    <limits.h>
 #endif
 #endif
 #endif /* BLD_UNIX_LIKE */
Index: src/mpr/mprSsl.c
--- src/mpr/mprSsl.c.orig	2009-05-13 00:07:33 +0200
+++ src/mpr/mprSsl.c	2009-05-13 21:55:28 +0200
@@ -71,6 +71,7 @@
     #include    <libgen.h>
     #include    <limits.h>
     #include    <netdb.h>
+    #include    <sys/socket.h>
     #include    <net/if.h>
     #include    <netinet/in.h>
     #include    <netinet/tcp.h>
@@ -95,7 +96,6 @@
     #include    <sys/resource.h>
     #include    <sys/sem.h>
     #include    <sys/shm.h>
-    #include    <sys/socket.h>
     #include    <sys/select.h>
     #include    <sys/time.h>
     #include    <sys/times.h>
@@ -115,7 +115,7 @@
     #define __USE_ISOC99 1
     #include    <math.h>
 #if !CYGWIN
-    #include    <values.h>
+    #include    <limits.h>
 #endif
 #endif
 #endif /* BLD_UNIX_LIKE */
Index: src/web/gateways/ejsCgi.c
--- src/web/gateways/ejsCgi.c.orig	2009-05-13 00:07:33 +0200
+++ src/web/gateways/ejsCgi.c	2009-05-13 21:55:28 +0200
@@ -15,6 +15,8 @@
 
 #include    "ejs.h"
 
+extern char **environ;
+
 /***************************** Forward Declarations *****************************/
 
 static void copyFile(cchar *url);
