cryptonight: silence ftime deprecated warning (#50)

silence `ftime` deprecated warning
This commit is contained in:
hinto-janai 2024-02-04 17:00:37 -05:00 committed by GitHub
parent 47238fbef3
commit 1f677562eb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -22,7 +22,16 @@ fn main() {
.file("c/slow-hash.c") .file("c/slow-hash.c")
.file("c/CryptonightR_JIT.c") .file("c/CryptonightR_JIT.c")
.flag("-O3") .flag("-O3")
.flag("-fexceptions"); .flag("-fexceptions")
// c/oaes_lib.c: In function oaes_get_seed:
// c/oaes_lib.c:515:9: warning: ftime is deprecated: Use gettimeofday or clock_gettime instead [-Wdeprecated-declarations]
// 515 | ftime (&timer);
// | ^~~~~
// In file included from c/oaes_lib.c:45:
// /usr/include/sys/timeb.h:29:12: note: declared here
// 29 | extern int ftime (struct timeb *__timebuf)
// | ^~~~~
.flag("-Wno-deprecated-declarations");
let target = env::var("TARGET").unwrap(); let target = env::var("TARGET").unwrap();
if target.contains("x86_64") { if target.contains("x86_64") {