#include <GL/freeglut.h>
#include "freeglut_internal.h"
-#if HAVE_ERRNO
+#if HAVE_ERRNO_H
# include <errno.h>
#endif
#include <stdarg.h>
wait.tv_usec = (msec % 1000) * 1000;
err = select( socket+1, &fdset, NULL, NULL, &wait );
-#if HAVE_ERRNO
+#if HAVE_ERRNO_H
if( ( -1 == err ) && ( errno != EINTR ) )
fgWarning ( "freeglut select() error: %d", errno );
#endif
switch( event.type )
{
case ClientMessage:
+ if(fgIsSpaceballXEvent(&event)) {
+ fgSpaceballHandleXEvent(&event);
+ break;
+ }
/* Destroy the window when the WM_DELETE_WINDOW message arrives */
if( (Atom) event.xclient.data.l[ 0 ] == fgDisplay.DeleteWindow )
{