mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-15 08:34:30 +02:00
8005442: autogen.sh sets DATE_WHEN_GENERATED to empty string on Solaris version 11 or later
Reviewed-by: ohair
This commit is contained in:
parent
ec348edbe6
commit
cd3ceb4771
1 changed files with 5 additions and 3 deletions
|
@ -26,9 +26,11 @@ script_dir=`dirname $0`
|
|||
|
||||
# Create a timestamp as seconds since epoch
|
||||
if test "x`uname -s`" = "xSunOS"; then
|
||||
# date +%s is not available on Solaris, use this workaround
|
||||
# from http://solarisjedi.blogspot.co.uk/2006/06/solaris-date-command-and-epoch-time.html
|
||||
TIMESTAMP=`/usr/bin/truss /usr/bin/date 2>&1 | nawk -F= '/^time\(\)/ {gsub(/ /,"",$2);print $2}'`
|
||||
TIMESTAMP=`date +%s`
|
||||
if test "x$TIMESTAMP" = "x%s"; then
|
||||
# date +%s not available on this Solaris, use workaround from nawk(1):
|
||||
TIMESTAMP=`nawk 'BEGIN{print srand()}'`
|
||||
fi
|
||||
else
|
||||
TIMESTAMP=`date +%s`
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue