Fix compile error of tsf benchmark (#2588)

Explicitly declare readdir_r in gpc_code_gen_util.c.
This commit is contained in:
Wenyong Huang 2023-09-25 20:25:01 +08:00 committed by GitHub
parent 99b47fd334
commit efb5cca93d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,18 @@
diff -urN tsf-src-org/gpc_code_gen_util.c tsf-src/gpc_code_gen_util.c
--- tsf-src-org/gpc_code_gen_util.c 2023-09-21 11:12:40.211166472 +0800
+++ tsf-src/gpc_code_gen_util.c 2023-09-21 11:09:13.643170967 +0800
@@ -34,6 +34,8 @@
#include <errno.h>
#include <dirent.h>
+int readdir_r(DIR *dirp, struct dirent *entry, struct dirent **result);
+
/* code generation debugging */
/* NOTE: It is now the case that the count may be incremented multiple times,
diff -urN tsf-src-org/tsf_internal.h tsf-src/tsf_internal.h
--- tsf-src-org/tsf_internal.h 2023-03-31 10:49:45.000000000 +0800
+++ tsf-src/tsf_internal.h 2023-05-11 08:18:35.000000000 +0800
--- tsf-src-org/tsf_internal.h 2023-09-21 11:11:50.843167546 +0800
+++ tsf-src/tsf_internal.h 2023-09-21 11:06:53.031174027 +0800
@@ -429,6 +429,7 @@
#endif
tsf_fsdb_connection_t *connection;
@ -10,15 +22,15 @@ diff -urN tsf-src-org/tsf_internal.h tsf-src/tsf_internal.h
} u;
tsf_limits_t *limits;
diff -urN tsf-src-org/tsf_ir_speed.c tsf-src/tsf_ir_speed.c
--- tsf-src-org/tsf_ir_speed.c 2023-03-31 10:49:45.000000000 +0800
+++ tsf-src/tsf_ir_speed.c 2023-05-11 08:18:35.000000000 +0800
--- tsf-src-org/tsf_ir_speed.c 2023-09-21 11:12:15.699167005 +0800
+++ tsf-src/tsf_ir_speed.c 2023-09-21 11:06:53.031174027 +0800
@@ -63,6 +63,9 @@
Program_t *program;
unsigned elementIndex;
+ if (!(programIndex % 100))
+ printf("##programIndex: %u\n", programIndex);
+
CS(program = tsf_region_create(sizeof(Program_t)));
program->globals.len = numDecls + numDefns;