That's the proper way to use crypt.h
authorMarkus Bröker <mbroeker@largo.dyndns.tv>
Tue, 01 Jun 2010 13:13:34 +0200
changeset 128 efa226a4801e
parent 127 162c0af185d7
child 129 d82830a449a9
That's the proper way to use crypt.h committer: Markus Bröker <mbroeker@largo.homelinux.org>
Makefile
crypt.c
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
      CC = gcc -g -ggdb $(PROF)
     CPP = g++ -g -ggdb $(PROF)
  CFLAGS = -Wall -O2 -Iinclude $(EXTRA)
-  EXTRA = #-DNO_CRYPT
+  EXTRA = -D_XOPEN_SOURCE
 LDFLAGS = -L/usr/lib
      RM = rm -f
    FIND = find
--- a/crypt.c
+++ b/crypt.c
@@ -8,10 +8,6 @@
 #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))
 
 int main (int argc, char **argv)