include string.h for FD_ZERO in sys/select.h

* sys/select.h was not self contained before, this fixes #9327
* index is defined as a function in string.h, fixed resulting name
  collision in glut_shapes.c
This commit is contained in:
Jérôme Duval 2012-12-28 18:30:03 +01:00
parent d917edcecd
commit 00e7904406
2 changed files with 5 additions and 2 deletions

View File

@ -43,6 +43,9 @@ typedef struct fd_set {
#define _FD_BITSINDEX(fd) ((fd) / NFDBITS)
#define _FD_BIT(fd) (1L << ((fd) % NFDBITS))
// FD_ZERO uses memset
#include <string.h>
#define FD_ZERO(set) memset((set), 0, sizeof(fd_set))
#define FD_SET(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] |= _FD_BIT(fd))
#define FD_CLR(fd, set) ((set)->bits[_FD_BITSINDEX(fd)] &= ~_FD_BIT(fd))

View File

@ -507,7 +507,7 @@ static GLfloat idata[12][3] =
{-Z, -X, 0}
};
static int index[20][3] =
static int iIndex[20][3] =
{
{0, 4, 1},
{0, 9, 4},
@ -537,7 +537,7 @@ icosahedron(GLenum shadeType)
int i;
for (i = 19; i >= 0; i--) {
drawtriangle(i, idata, index, shadeType);
drawtriangle(i, idata, iIndex, shadeType);
}
}