#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);
+ }
}