$NetBSD$

--- src/VncSelector.cxx.orig	2004-09-23 04:37:35.000000000 -0400
+++ src/VncSelector.cxx
@@ -29,6 +29,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <memory.h>
+#include <sys/types.h>
 #include <sys/ptrace.h>
 #include <sys/stat.h>
 #include <unistd.h>
@@ -42,7 +43,6 @@
 #include <FL/Fl_Image.H>
 
 #include <dirent.h>
-#include <sys/types.h>
 #include <sys/wait.h>
 
 // STL
@@ -56,6 +56,11 @@
 #include "VncOptions.h"
 #include "VncAddDialogUI.h"
 
+#define __environ environ
+#ifndef HAVE_ENVIRON_DECL
+extern char **environ;
+#endif
+
 VncSelector*  VncSelector::m_instance = NULL;
 
 
