2004/01/20 09:54:41
[org.ibex.core.git] / src / org / xwt / plat / Linux.cc
index 7b82e2b..39ab5a8 100644 (file)
@@ -3,7 +3,14 @@
 
 #include <org/xwt/plat/Linux.h>
 
-void org::xwt::plat::X11$X11PixelBuffer::fixEnvironment() {
+// we love libgcj!
+extern const char **_Jv_argv;
+extern int _Jv_argc;
+
+void org::xwt::plat::Linux::fixEnvironment() {
   // see http://lists.debian.org/debian-glibc/2003/debian-glibc-200311/msg00647.html
-  setenv("LD_ASSUME_KERNEL", "2.4.1", 0);
+    if (!strcmp("2.4.1", getenv("LD_ASSUME_KERNEL"))) {
+        putenv("LD_ASSUME_KERNEL", "2.4.1");
+        execvp(_Jv_argv[0], _Jv_argv);
+    }
 }