summaryrefslogtreecommitdiff
path: root/python
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2012-02-06 14:55:25 +0100
committerMichael Vogt <michael.vogt@ubuntu.com>2012-02-06 14:55:25 +0100
commit3514672ed2a333eb6791d425ebe59b883cf8d349 (patch)
treea49cad561fee59087950ba07d85c242060c4cae2 /python
parente93ad4643202b6227ea9e4ab765cbb272c9d2413 (diff)
downloadpython-apt-3514672ed2a333eb6791d425ebe59b883cf8d349.tar.gz
python/tag.cc: make it build with older apt versions too
Diffstat (limited to 'python')
-rw-r--r--python/tag.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/python/tag.cc b/python/tag.cc
index 88a48df9..49f53c31 100644
--- a/python/tag.cc
+++ b/python/tag.cc
@@ -425,7 +425,12 @@ static PyObject *TagFileNew(PyTypeObject *type,PyObject *Args,PyObject *kwds)
}
else
{
+ // FileFd::Extension got added in this revision
+#if (APT_PKG_MAJOR >= 4 && APT_PKG_MINOR >= 12)
new (&New->Fd) FileFd(filename, FileFd::ReadOnly, FileFd::Extension, false);
+#else
+ new (&New->Fd) FileFd(filename, FileFd::ReadOnly, false);
+#endif
}
New->Owner = File;
Py_INCREF(New->Owner);