#ifdef __GNUG__
 #pragma implementation "joystick.h"
 #endif
+#if wxUSE_JOYSTICK
 
 #include <linux/joystick.h>
 #include <sys/types.h>
   struct timeval time_out = {0, 0};
 
   FD_ZERO(&read_fds);
-  DeferDestroy(TRUE);
   while (1) {
     TestDestroy();
 
 
 wxString wxJoystick::GetProductName(void) const
 {
-  return "";
+  return wxT("");
 }
 
 int wxJoystick::GetXMin(void) const
   m_polling = 0;
   return TRUE;
 }
+#endif  // wxUSE_JOYSTICK