<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">diff -burN newlib-1.13.0/newlib/libc/include/time.h newlib-1.13.0-patched/newlib/libc/include/time.h
--- newlib-1.13.0/newlib/libc/include/time.h	2004-02-09 23:56:46.000000000 +0100
+++ newlib-1.13.0-patched/newlib/libc/include/time.h	2007-03-03 14:38:19.000000000 +0100
@@ -105,7 +105,7 @@
 #endif
 
 /* CYGWIN also exposes daylight and timezone in the name space */
-#ifdef __CYGWIN__
+#ifdef __CYGWIN__ || __psp__
 #ifndef daylight
 #define daylight _daylight
 #endif
@@ -116,7 +116,7 @@
 #else
 char *_EXFUN(timezone, (void));
 #endif
-#endif /* __CYGWIN__ */
+#endif /* __CYGWIN__ || __psp__ */
 #endif /* !__STRICT_ANSI__ */
 
 #ifdef __cplusplus
@@ -164,7 +164,7 @@
 }
 #endif
 #else
-#ifdef __CYGWIN__
+#ifdef __CYGWIN__ || __psp__
 #ifdef __cplusplus
 extern "C" {
 #endif
@@ -172,8 +172,17 @@
 #ifdef __cplusplus
 }
 #endif
-#endif /* __CYGWIN__ */
+#endif /* __CYGWIN__ || __psp__ */
 #endif /* _POSIX_TIMERS */
+#if defined(__psp__)
+#ifdef __cplusplus
+extern "C" {
+#endif
+int _EXFUN(nanosleep, (const struct timespec  *rqtp, struct timespec *rmtp));
+#ifdef __cplusplus
+}
+#endif
+#endif /*  __psp__ */
 
 #ifdef __cplusplus
 extern "C" {
diff -burN newlib-1.13.0/newlib/libc/sys/psp/Makefile.am newlib-1.13.0-patched/newlib/libc/sys/psp/Makefile.am
--- newlib-1.13.0/newlib/libc/sys/psp/Makefile.am	2007-03-03 15:16:19.000000000 +0100
+++ newlib-1.13.0-patched/newlib/libc/sys/psp/Makefile.am	2007-03-03 14:53:24.000000000 +0100
@@ -12,7 +12,7 @@
                      _link.o _unlink.o sleep.o opendir.o readdir.o	\
                      closedir.o getcwd.o chdir.o mkdir.o rmdir.o	\
                      realpath.o _stat.o truncate.o access.o tzset.o	\
-                     __psp_set_errno.o mlock.o _fcntl.o _rename.o
+                     __psp_set_errno.o mlock.o _fcntl.o _rename.o nanosleep.o
 
 SOCKET_MULT_OBJS = socket.o accept.o bind.o connect.o getsockopt.o \
 				   listen.o recv.o recvfrom.o send.o sendto.o \
diff -burN newlib-1.13.0/newlib/libc/sys/psp/Makefile.in newlib-1.13.0-patched/newlib/libc/sys/psp/Makefile.in
--- newlib-1.13.0/newlib/libc/sys/psp/Makefile.in	2007-03-03 15:16:19.000000000 +0100
+++ newlib-1.13.0-patched/newlib/libc/sys/psp/Makefile.in	2007-03-03 14:53:17.000000000 +0100
@@ -92,7 +92,7 @@
 
 noinst_LIBRARIES = lib.a
 
-LIBCGLUE_MULT_OBJS = _close.o _exit.o _fork.o _fstat.o _getpid.o	                     _gettimeofday.o _kill.o _lseek.o _open.o _read.o	                     _sbrk.o _wait.o _write.o clock.o isatty.o time.o	                     _link.o _unlink.o sleep.o opendir.o readdir.o	                     closedir.o getcwd.o chdir.o mkdir.o rmdir.o	                     realpath.o _stat.o truncate.o access.o tzset.o	                     __psp_set_errno.o mlock.o _fcntl.o _rename.o
+LIBCGLUE_MULT_OBJS = _close.o _exit.o _fork.o _fstat.o _getpid.o	                     _gettimeofday.o _kill.o _lseek.o _open.o _read.o	                     _sbrk.o _wait.o _write.o clock.o isatty.o time.o	                     _link.o _unlink.o sleep.o opendir.o readdir.o	                     closedir.o getcwd.o chdir.o mkdir.o rmdir.o	                     realpath.o _stat.o truncate.o access.o tzset.o	                     __psp_set_errno.o mlock.o _fcntl.o _rename.o nanosleep.o
 
 
 SOCKET_MULT_OBJS = socket.o accept.o bind.o connect.o getsockopt.o 				   listen.o recv.o recvfrom.o send.o sendto.o 				   setsockopt.o shutdown.o getsockname.o getpeername.o 				   inet_ntoa.o
@@ -136,7 +136,7 @@
 snprintf.o vsprintf.o sprintf.o __mout.o mprintf.o vmprintf.o \
 asprintf.o vasprintf.o __fout.o fprintf.o vfprintf.o printf.o vprintf.o \
 _sprintf_r.o h_errno.o gethostbyaddr.o gethostbyname.o pipe.o fdman.o \
-select.o interrupt.o
+select.o interrupt.o nanosleep.o
 lib_a_OBJECTS =  libcglue.o socket.o pspcwd.o xprintf.o netdb.o pipe.o \
 fdman.o select.o interrupt.o
 CFLAGS = @CFLAGS@
diff -burN newlib-1.13.0/newlib/libc/sys/psp/libcglue.c newlib-1.13.0-patched/newlib/libc/sys/psp/libcglue.c
--- newlib-1.13.0/newlib/libc/sys/psp/libcglue.c	2007-03-03 15:16:19.000000000 +0100
+++ newlib-1.13.0-patched/newlib/libc/sys/psp/libcglue.c	2007-03-03 16:31:53.000000000 +0100
@@ -870,6 +870,19 @@
 }
 #endif
 
+#ifdef F_nanosleep
+/* note: we don't use rem as we have no signals */
+int nanosleep(const struct timespec *req, struct timespec *rem)
+{
+    if( req == NULL )
+        return EFAULT;
+
+    sceKernelDelayThreadCB( 1000000 * req-&gt;tv_sec + (req-&gt;tv_nsec / 1000) ); 
+
+    return 0;
+}
+#endif
+
 /* Exit. */
 #if defined(F__exit) || defined(F_glue__exit)
 extern int sce_newlib_nocreate_thread_in_start __attribute__((weak));
</pre></body></html>