crypt.h seems to be broken on many systems.
The manpage tells me that i have to include unistd.h...
committer: Markus Bröker <mbroeker@largo.homelinux.org>
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
CC = gcc -g -ggdb $(PROF)
CPP = g++ -g -ggdb $(PROF)
- CFLAGS = -Wall -O2 -Iinclude #-ansi
+ CFLAGS = -Wall -O2 -Iinclude $(EXTRA)
+ EXTRA = #-DNO_CRYPT
LDFLAGS = -L/usr/lib
RM = rm -f
FIND = find
--- a/crypt.c
+++ b/crypt.c
@@ -6,7 +6,11 @@
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
+#include <unistd.h>
+
+#ifndef NO_CRYPT
#include <crypt.h>
+#endif
#define GETRANDOM(max) ('a'+(int)((float)(max)*rand()/RAND_MAX+1.0))