Reserve for unaligned buffer. The problem was "pointed out" be HPUX64
gcc, which failed to compile it with "not aligned" at higher optimization levels.
This commit is contained in:
parent
50f40631d0
commit
326e02b260
@ -127,8 +127,8 @@ static void fips_gettime(unsigned char buf[8])
|
|||||||
}
|
}
|
||||||
gettimeofday(&tv,NULL);
|
gettimeofday(&tv,NULL);
|
||||||
assert(sizeof(long) == 4);
|
assert(sizeof(long) == 4);
|
||||||
*(long *)&buf[0]=tv.tv_sec;
|
memcpy (&buf[0],&tv.tv_sec,4);
|
||||||
*(long *)&buf[4]=tv.tv_usec;
|
memcpy (&buf[4],&tv.tv_usec,4);
|
||||||
|
|
||||||
#ifndef GETPID_IS_MEANINGLESS
|
#ifndef GETPID_IS_MEANINGLESS
|
||||||
/* we mix in the PID to ensure that after a fork the children don't give
|
/* we mix in the PID to ensure that after a fork the children don't give
|
||||||
|
Loading…
x
Reference in New Issue
Block a user