projects
/
freeglut
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Protecting "errno" in case it is not defined per e-mail from Vincent R dated 5:37...
[freeglut]
/
src
/
freeglut_main.c
diff --git
a/src/freeglut_main.c
b/src/freeglut_main.c
index
058f462
..
fa0174e
100644
(file)
--- a/
src/freeglut_main.c
+++ b/
src/freeglut_main.c
@@
-27,7
+27,9
@@
#include <GL/freeglut.h>
#include "freeglut_internal.h"
#include <GL/freeglut.h>
#include "freeglut_internal.h"
-#include <errno.h>
+#if HAVE_ERRNO
+# include <errno.h>
+#endif
#include <stdarg.h>
#if HAVE_VPRINTF
# define VFPRINTF(s,f,a) vfprintf((s),(f),(a))
#include <stdarg.h>
#if HAVE_VPRINTF
# define VFPRINTF(s,f,a) vfprintf((s),(f),(a))
@@
-471,8
+473,10
@@
static void fghSleepForEvents( void )
wait.tv_usec = (msec % 1000) * 1000;
err = select( socket+1, &fdset, NULL, NULL, &wait );
wait.tv_usec = (msec % 1000) * 1000;
err = select( socket+1, &fdset, NULL, NULL, &wait );
+#if HAVE_ERRNO
if( ( -1 == err ) && ( errno != EINTR ) )
fgWarning ( "freeglut select() error: %d", errno );
if( ( -1 == err ) && ( errno != EINTR ) )
fgWarning ( "freeglut select() error: %d", errno );
+#endif
}
#elif TARGET_HOST_MS_WINDOWS
MsgWaitForMultipleObjects( 0, NULL, FALSE, msec, QS_ALLINPUT );
}
#elif TARGET_HOST_MS_WINDOWS
MsgWaitForMultipleObjects( 0, NULL, FALSE, msec, QS_ALLINPUT );