Skip to content

Commit ce0ed66

Browse files
authored
Update pthread stub signatures (#16682)
pthread_setcancelstate, pthread_setcanceltype, and dummy_getpid previously did not have any arguments in library_pthread_stub.c. Fix them to take the proper arguments to avoid new compiler warnings.
1 parent 0c66276 commit ce0ed66

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

system/lib/pthread/library_pthread_stub.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -285,11 +285,11 @@ int pthread_attr_destroy(pthread_attr_t *attr) {
285285
return 0;
286286
}
287287

288-
int pthread_setcancelstate() {
288+
int pthread_setcancelstate(int state, int* oldstate) {
289289
return 0;
290290
}
291291

292-
int pthread_setcanceltype() {
292+
int pthread_setcanceltype(int type, int* oldtype) {
293293
return 0;
294294
}
295295

system/lib/pthread/pthread_create.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ static void init_file_lock(FILE *f) {
6666
static pid_t next_tid = 0;
6767

6868
// In case the stub syscall is not linked it
69-
static int dummy_getpid() {
69+
static int dummy_getpid(void) {
7070
return 42;
7171
}
7272
weak_alias(dummy_getpid, __syscall_getpid);

0 commit comments

Comments
 (0)