-
Notifications
You must be signed in to change notification settings - Fork 290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix ftime
warning
#3710
fix ftime
warning
#3710
Conversation
Codecov Report
@@ Coverage Diff @@
## master #3710 +/- ##
==========================================
+ Coverage 55.31% 55.71% +0.41%
==========================================
Files 597 597
Lines 64331 64330 -1
==========================================
+ Hits 35580 35838 +258
+ Misses 28751 28492 -259
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
@@ -518,6 +518,7 @@ static uint32_t oaes_get_seed(void) | |||
gmTimer->tm_hour + gmTimer->tm_min + gmTimer->tm_sec + timer.millitm + | |||
(uintptr_t) ( _test + timer.millitm ) + GETPID(); | |||
#else | |||
#include <sys/time.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://man7.org/linux/man-pages/man3/ftime.3.html 参考这里可以使用time或gettimeofday, C programming include一般写在开头
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
把里面的 #include 去掉了,改成文件开始时判断条件 include,在glibc 2.31以上用gettimeofday,其他时候保持原样
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这些修改在 mac 和 window 不知道有没有问题
@sanlee42 看看 |
mac intel试了下没问题,看看哪位有windows可以帮忙试下 |
好像是这个修改导致在 windows 下编译有问题 https://github.com/starcoinorg/starcoin/actions/runs/3132729622/jobs/5085372469 |
Pull request type
Please check the type of change your PR introduces:
What is the current behavior?
Issue Number: fix #3709
What is the new behavior?
Other information