]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Make sure that sigalrm.c compiles correctly on systems that do not have the header...
authorBart Van Assche <bvanassche@acm.org>
Fri, 16 Jan 2009 12:07:52 +0000 (12:07 +0000)
committerBart Van Assche <bvanassche@acm.org>
Fri, 16 Jan 2009 12:07:52 +0000 (12:07 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@8969

drd/tests/sigalrm.c

index 2023cf35c5b18d1e45fecd3d12e174b186a31a66..14a1a7fdc2dcd8cb4853bb6a8dd0c9883faa2c52 100644 (file)
@@ -1,4 +1,4 @@
-#if !defined(_AIX)
+#include "../../config.h"
 #include <assert.h>
 #include <errno.h>
 #include <pthread.h>
@@ -8,7 +8,9 @@
 #include <string.h>
 #include <time.h>
 #include <unistd.h>
-#include <asm/unistd.h>
+#ifdef HAVE_ASM_UNISTD_H
+#include <asm/unistd.h> // __NR_gettid
+#endif
 #include "../drd.h"
 
 
@@ -84,11 +86,3 @@ int main(int argc, char** argv)
 
   return 0;
 }
-
-#else /* !defined(_AIX) */
-#include <stdio.h>
-int main ( void ) {
-  fprintf(stderr, "This test does not compile on AIX5.\n");
-  return 0;
-}
-#endif /* !defined(_AIX) */