--- mg-20110905.orig/fileio.c +++ mg-20110905/fileio.c @@ -570,7 +570,7 @@ #if defined (__CYGWIN__) /* Cygwin lacks reclen/namlen. */ if (strlen(dent->d_name) < len || memcmp(cp, dent->d_name, len) != 0) -#elif defined (__GLIBC__) /* Linux uses reclen instead. */ +#elif defined (__linux__) /* Linux uses reclen instead. */ if (dent->d_reclen < len || memcmp(cp, dent->d_name, len) != 0) #else if (dent->d_namlen < len || memcmp(cp, dent->d_name, len) != 0) --- mg-20110905.orig/sysdef.h +++ mg-20110905/sysdef.h @@ -20,15 +20,13 @@ /* necesarry to get asprintf & friends with glibc XXX doesn't work for some * mysterious reason! */ -#ifdef __GLIBC__ -# define _GNU_SOURCE -# define __USE_GNU -#endif +#define _GNU_SOURCE #include #include #include #include +#include #include #include --- mg-20110905.orig/theo.c +++ mg-20110905/theo.c @@ -218,14 +218,14 @@ { const char *str; int len; - uint random; + unsigned int random; #ifndef HAVE_ARC4RANDOM struct timeval tv[2]; gettimeofday(&tv[0], NULL); - random = (uint)tv[0].tv_usec; + random = (unsigned int)tv[0].tv_usec; #else - random = (uint)arc4random(); + random = (unsigned int)arc4random(); #endif str = talk[random % ntalk];