summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2008-04-18 18:07:40 +0000
committerJim Meyering <meyering@redhat.com>2008-04-18 18:07:40 +0000
commit4f96b58763738e2c4c1e0dae04820e4e886cc6ab (patch)
treeb738439695f5a76202588947fa65caff265cc4c0
parentca9387e8829ff802f1d214fbc93c68145fdd8852 (diff)
downloadlibvirt-python-split-4f96b58763738e2c4c1e0dae04820e4e886cc6ab.tar.gz
libvirt-python-split-4f96b58763738e2c4c1e0dae04820e4e886cc6ab.tar.xz
libvirt-python-split-4f96b58763738e2c4c1e0dae04820e4e886cc6ab.zip
Work around Python.h name-space pollution.
* python/libvir.c (HAVE_PTHREAD_H): #undef. Without this, we'd get a redefinition warning.
-rw-r--r--libvir.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/libvir.c b/libvir.c
index 0ca2dca..8258cc2 100644
--- a/libvir.c
+++ b/libvir.c
@@ -4,13 +4,18 @@
* entry points where an automatically generated stub is
* unpractical
*
- * Copyright (C) 2005, 2007 Red Hat, Inc.
+ * Copyright (C) 2005, 2007, 2008 Red Hat, Inc.
*
* Daniel Veillard <veillard@redhat.com>
*/
#include <config.h>
+/* Horrible kludge to work around even more horrible name-space pollution
+ via Python.h. That file includes /usr/include/python2.5/pyconfig*.h,
+ which has over 180 autoconf-style HAVE_* definitions. Shame on them. */
+#undef HAVE_PTHREAD_H
+
#include <Python.h>
#include "libvirt/libvirt.h"
#include "libvirt/virterror.h"