Skip to content

Commit 0aa4778

Browse files
committed
Avoid using default lock implementation
1 parent 7ebb623 commit 0aa4778

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

newlib/configure.host

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,7 +546,7 @@ case "${host}" in
546546
mips*-ps2-*)
547547
sys_dir=ps2
548548
posix_dir=posix
549-
newlib_cflags="${newlib_cflags} -G0 -DHAVE_NANOSLEEP -DHAVE_RENAME -DHAVE_FCNTL -D_NO_POSIX_SPAWN"
549+
newlib_cflags="${newlib_cflags} -G0 -DHAVE_NANOSLEEP -DHAVE_RENAME -DHAVE_FCNTL -D_NO_POSIX_SPAWN -DHAVE_DD_LOCK"
550550
;;
551551
mmix-knuth-mmixware)
552552
sys_dir=mmixware

newlib/libc/misc/lock.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,9 @@ subroutines are required for linking multi-threaded applications.
8181

8282
/* dummy lock routines and static locks for single-threaded apps */
8383

84-
#ifndef __SINGLE_THREAD__
84+
#include <newlib.h>
85+
86+
#if defined(__SINGLE_THREAD__)
8587

8688
#include <sys/lock.h>
8789

newlib/libc/sys/ps2/sys/dirent.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ typedef struct __dirdesc {
88
char *dd_buf; /* buffer */
99
int dd_len; /* buffer length */
1010
int dd_size; /* amount of data in buffer */
11+
void *dd_lock; /* lock */
1112
} DIR;
1213

1314
# define __dirfd(dp) ((dp)->dd_fd)

0 commit comments

Comments
 (0)