diff --git a/newlib/configure.host b/newlib/configure.host index 59b2508d3f..30a6051a17 100644 --- a/newlib/configure.host +++ b/newlib/configure.host @@ -534,7 +534,7 @@ case "${host}" in mips*-ps2-*) sys_dir=ps2 posix_dir=posix - newlib_cflags="${newlib_cflags} -G0 -DHAVE_NANOSLEEP -DHAVE_RENAME -DHAVE_FCNTL -D_NO_POSIX_SPAWN" + newlib_cflags="${newlib_cflags} -G0 -DHAVE_NANOSLEEP -DHAVE_RENAME -DHAVE_FCNTL -D_NO_POSIX_SPAWN -DHAVE_DD_LOCK" ;; mmix-knuth-mmixware) sys_dir=mmixware diff --git a/newlib/libc/misc/lock.c b/newlib/libc/misc/lock.c index c03c36a1e4..26b7fd18e5 100644 --- a/newlib/libc/misc/lock.c +++ b/newlib/libc/misc/lock.c @@ -81,7 +81,9 @@ subroutines are required for linking multi-threaded applications. /* dummy lock routines and static locks for single-threaded apps */ -#ifndef __SINGLE_THREAD__ +#include + +#if defined(__SINGLE_THREAD__) #include diff --git a/newlib/libc/sys/ps2/sys/dirent.h b/newlib/libc/sys/ps2/sys/dirent.h index e7a6434f6c..5c8c2a0f31 100644 --- a/newlib/libc/sys/ps2/sys/dirent.h +++ b/newlib/libc/sys/ps2/sys/dirent.h @@ -8,6 +8,7 @@ typedef struct __dirdesc { char *dd_buf; /* buffer */ int dd_len; /* buffer length */ int dd_size; /* amount of data in buffer */ + void *dd_lock; /* lock */ } DIR; # define __dirfd(dp) ((dp)->dd_fd)