error: ‘NAN’ undeclared when installing igraph

I got this strange error when installing igraph:

plfit/gss.c: In function ‘gss’:
plfit/gss.c:92: error: ‘NAN’ undeclared (first use in this function)
plfit/gss.c:92: error: (Each undeclared identifier is reported only once
plfit/gss.c:92: error: for each function it appears in.)
plfit/gss.c:93: error: ‘INFINITY’ undeclared (first use in this function)

It turns out to be a compiler standard problem. Adding the flag CFLAGS=’-std=gnu99′ to make solves the problem

Advertisements