Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/lib/libpthread Fix SSP build.
details: https://anonhg.NetBSD.org/src/rev/7d841d138567
branches: trunk
changeset: 761371:7d841d138567
user: christos <christos%NetBSD.org@localhost>
date: Tue Jan 25 19:13:26 2011 +0000
description:
Fix SSP build.
XXX: This is gross.
diffstat:
lib/libpthread/pthread_cancelstub.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
diffs (52 lines):
diff -r daa15b09ad64 -r 7d841d138567 lib/libpthread/pthread_cancelstub.c
--- a/lib/libpthread/pthread_cancelstub.c Tue Jan 25 19:12:04 2011 +0000
+++ b/lib/libpthread/pthread_cancelstub.c Tue Jan 25 19:13:26 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pthread_cancelstub.c,v 1.28 2010/08/06 05:25:46 christos Exp $ */
+/* $NetBSD: pthread_cancelstub.c,v 1.29 2011/01/25 19:13:26 christos Exp $ */
/*-
* Copyright (c) 2002, 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__RCSID("$NetBSD: pthread_cancelstub.c,v 1.28 2010/08/06 05:25:46 christos Exp $");
+__RCSID("$NetBSD: pthread_cancelstub.c,v 1.29 2011/01/25 19:13:26 christos Exp $");
#ifndef lint
@@ -59,7 +59,12 @@
#include <mqueue.h>
#include <poll.h>
#include <stdarg.h>
+
+#define read _read
#include <unistd.h>
+#undef read
+ssize_t read(int, void *, size_t);
+
#include <signal.h>
#include <sys/mman.h>
@@ -468,16 +473,16 @@
return retval;
}
-#ifdef _FORTIFY_SOURCE
-#undef read
-#endif
-
ssize_t
read(int d, void *buf, size_t nbytes)
{
ssize_t retval;
pthread_t self;
+#ifdef __ssp_check
+ __ssp_check(buf, nbytes, __ssp_bos0);
+#endif
+
self = pthread__self();
TESTCANCEL(self);
retval = _sys_read(d, buf, nbytes);
Home |
Main Index |
Thread Index |
Old Index