aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2003-10-24 20:48:10 +0000
committerBruce Momjian <bruce@momjian.us>2003-10-24 20:48:10 +0000
commitcded27cacdbf97484b55c4cbaf94b0c97af47925 (patch)
treec49e6f601f09f6859801bdc9da013b53cac9eb9f /src
parent863d793fa358dcba338479e26758e7d52331bc1e (diff)
downloadpostgresql-cded27cacdbf97484b55c4cbaf94b0c97af47925.tar.gz
postgresql-cded27cacdbf97484b55c4cbaf94b0c97af47925.zip
Don't reference pthread.h unless we have threads enabled, per Peter.
Diffstat (limited to 'src')
-rw-r--r--src/port/thread.c4
-rw-r--r--src/tools/thread/thread_test.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/src/port/thread.c b/src/port/thread.c
index 729c0e8ad3c..a37a0ed4fd9 100644
--- a/src/port/thread.c
+++ b/src/port/thread.c
@@ -7,14 +7,16 @@
*
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
*
- * $Id: thread.c,v 1.10 2003/09/29 03:32:05 momjian Exp $
+ * $Id: thread.c,v 1.11 2003/10/24 20:48:10 momjian Exp $
*
*-------------------------------------------------------------------------
*/
#include "postgres.h"
+#if defined(USE_THREADS)
#include <pthread.h>
+#endif
#include <sys/types.h>
#include <pwd.h>
#include <errno.h>
diff --git a/src/tools/thread/thread_test.c b/src/tools/thread/thread_test.c
index b5db0e28ecb..22d925ebef1 100644
--- a/src/tools/thread/thread_test.c
+++ b/src/tools/thread/thread_test.c
@@ -6,7 +6,7 @@
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
- * $Header: /cvsroot/pgsql/src/tools/thread/Attic/thread_test.c,v 1.2 2003/09/27 16:24:45 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/tools/thread/Attic/thread_test.c,v 1.3 2003/10/24 20:48:10 momjian Exp $
*
* This program tests to see if your standard libc functions use
* pthread_setspecific()/pthread_getspecific() to be thread-safe.
@@ -21,7 +21,9 @@
*/
+#ifdef USE_THREADS
#include <pthread.h>
+#endif
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>