From: Bart Van Assche Date: Mon, 3 Mar 2008 07:40:54 +0000 (+0000) Subject: Made exp-drd/tests/trylock.c compile with older glibc versions. X-Git-Tag: svn/VALGRIND_3_4_0~975 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da207928dd7980f7aed26c8aacb91f7d5a2d01a3;p=thirdparty%2Fvalgrind.git Made exp-drd/tests/trylock.c compile with older glibc versions. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7544 --- diff --git a/exp-drd/tests/trylock.c b/exp-drd/tests/trylock.c index 239293990f..8431c0c940 100644 --- a/exp-drd/tests/trylock.c +++ b/exp-drd/tests/trylock.c @@ -1,7 +1,20 @@ +/** Test interception of the various pthread_timed*lock() and pthread_try*lock() + * functions. If any of these are not intercepted, an error message will be + * printed at unlock time. + */ + + +/* Needed for older glibc's (2.3 and older, at least) who don't + otherwise "know" about pthread_rwlock_anything or about + PTHREAD_MUTEX_RECURSIVE (amongst things). */ + +#define _GNU_SOURCE 1 + #include #include #include + int main(int argc, char** argv) { int r;