From 039837878d63425bcaaf0c9d999c49ed843b253b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Thu, 14 Jun 2007 14:43:41 +0200 Subject: [PATCH] mcookie: remove non-linux code Something like #ifdef __linux__ is non-sense in util-linux where everything depend on linux. Signed-off-by: Karel Zak --- misc-utils/mcookie.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) diff --git a/misc-utils/mcookie.c b/misc-utils/mcookie.c index dee26c56..4f141740 100644 --- a/misc-utils/mcookie.c +++ b/misc-utils/mcookie.c @@ -20,18 +20,12 @@ * */ -#ifdef __linux__ -#define HAVE_GETTIMEOFDAY 1 -#endif - #include #include #include #include "md5.h" -#ifdef HAVE_GETTIMEOFDAY #include #include -#endif #include "nls.h" #define BUFFERSIZE 4096 @@ -79,12 +73,8 @@ int main( int argc, char **argv ) pid_t pid; char *file = NULL; int r; -#ifdef HAVE_GETTIMEOFDAY struct timeval tv; struct timezone tz; -#else - long int t; -#endif setlocale(LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); @@ -97,14 +87,9 @@ int main( int argc, char **argv ) } MD5Init( &ctx ); - -#ifdef HAVE_GETTIMEOFDAY gettimeofday( &tv, &tz ); MD5Update( &ctx, (unsigned char *)&tv, sizeof( tv ) ); -#else - time( &t ); - MD5Update( &ctx, (unsigned char *)&t, sizeof( t ) ); -#endif + pid = getppid(); MD5Update( &ctx, (unsigned char *)&pid, sizeof( pid )); pid = getpid(); -- 2.39.5