diff options
author | Karel Zak | 2007-06-14 14:43:41 +0200 |
---|---|---|
committer | Karel Zak | 2007-06-14 14:43:41 +0200 |
commit | 039837878d63425bcaaf0c9d999c49ed843b253b (patch) | |
tree | 03738ae3b600b7b23a6dc86b795eb6a42f77f302 /misc-utils/mcookie.c | |
parent | mkfs.cramfs: cleanup HAVE_ macros usage (diff) | |
download | kernel-qcow2-util-linux-039837878d63425bcaaf0c9d999c49ed843b253b.tar.gz kernel-qcow2-util-linux-039837878d63425bcaaf0c9d999c49ed843b253b.tar.xz kernel-qcow2-util-linux-039837878d63425bcaaf0c9d999c49ed843b253b.zip |
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 <kzak@redhat.com>
Diffstat (limited to 'misc-utils/mcookie.c')
-rw-r--r-- | misc-utils/mcookie.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/misc-utils/mcookie.c b/misc-utils/mcookie.c index dee26c560..4f1417402 100644 --- a/misc-utils/mcookie.c +++ b/misc-utils/mcookie.c @@ -20,18 +20,12 @@ * */ -#ifdef __linux__ -#define HAVE_GETTIMEOFDAY 1 -#endif - #include <stdio.h> #include <stdlib.h> #include <fcntl.h> #include "md5.h" -#ifdef HAVE_GETTIMEOFDAY #include <sys/time.h> #include <unistd.h> -#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(); |