]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Made exp-drd/tests/trylock.c compile with older glibc versions.
authorBart Van Assche <bvanassche@acm.org>
Mon, 3 Mar 2008 07:40:54 +0000 (07:40 +0000)
committerBart Van Assche <bvanassche@acm.org>
Mon, 3 Mar 2008 07:40:54 +0000 (07:40 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@7544

exp-drd/tests/trylock.c

index 239293990f9ec58b47b341399ec0b8bc78e0aeb1..8431c0c940f3ac8dbe8b2f6e0597babefba0711b 100644 (file)
@@ -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 <stdio.h>
 #include <assert.h>
 #include <pthread.h>
 
+
 int main(int argc, char** argv)
 {
   int r;