[git commit branch/0.9.33] pread/pwrite: fix for !threads

Bernhard Reutner-Fischer rep.dot.nop at gmail.com
Tue Jan 8 09:14:22 UTC 2013


commit: http://git.uclibc.org/uClibc/commit/?id=b7cc54be07412f02ff464aa47a8871ba7a910e3e
branch: http://git.uclibc.org/uClibc/commit/?id=refs/heads/0.9.33

This is done properly via cancel.h on master.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop at gmail.com>
---
 libc/sysdeps/linux/common/pread_write.c |   11 ++++++++++-
 1 files changed, 10 insertions(+), 1 deletions(-)

diff --git a/libc/sysdeps/linux/common/pread_write.c b/libc/sysdeps/linux/common/pread_write.c
index baf8691..c142038 100644
--- a/libc/sysdeps/linux/common/pread_write.c
+++ b/libc/sysdeps/linux/common/pread_write.c
@@ -17,7 +17,16 @@
 #include <unistd.h>
 #include <stdint.h>
 #include <endian.h>
-#include <sysdep-cancel.h>
+#ifdef __UCLIBC_HAS_THREADS_NATIVE__
+#include "sysdep-cancel.h"
+#else
+/* No multi-thread handling enabled.  */
+#define SINGLE_THREAD_P (1)
+#define RTLD_SINGLE_THREAD_P (1)
+#define LIBC_CANCEL_ASYNC()	0 /* Just a dummy value.  */
+#define LIBC_CANCEL_RESET(val)	((void)(val)) /* Nothing, but evaluate it.  */
+#define LIBC_CANCEL_HANDLED()	/* Nothing.  */
+#endif
 
 extern __typeof(pread) __libc_pread;
 extern __typeof(pwrite) __libc_pwrite;


More information about the uClibc-cvs mailing list