summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--apt-pkg/cacheiterators.h4
-rw-r--r--apt-pkg/pkgcache.h3
2 files changed, 5 insertions, 2 deletions
diff --git a/apt-pkg/cacheiterators.h b/apt-pkg/cacheiterators.h
index fdc7fbc07..0cb684382 100644
--- a/apt-pkg/cacheiterators.h
+++ b/apt-pkg/cacheiterators.h
@@ -29,8 +29,10 @@
/*}}}*/
#ifndef PKGLIB_CACHEITERATORS_H
#define PKGLIB_CACHEITERATORS_H
+#ifndef __PKGLIB_IN_PKGCACHE_H
+#warning apt-pkg/cacheiterators.h should not be included directly, include apt-pkg/pkgcache.h instead
+#endif
#include <apt-pkg/macros.h>
-#include <apt-pkg/pkgcache.h>
#include <iosfwd>
#include <iterator>
diff --git a/apt-pkg/pkgcache.h b/apt-pkg/pkgcache.h
index acf6cf446..e1597c1b1 100644
--- a/apt-pkg/pkgcache.h
+++ b/apt-pkg/pkgcache.h
@@ -73,7 +73,7 @@
/*}}}*/
#ifndef PKGLIB_PKGCACHE_H
#define PKGLIB_PKGCACHE_H
-
+#define __PKGLIB_IN_PKGCACHE_H
#include <apt-pkg/macros.h>
#include <apt-pkg/mmap.h>
@@ -825,4 +825,5 @@ class pkgCache::Namespace /*{{{*/
typedef pkgCache::Flag Flag;
};
/*}}}*/
+#undef __PKGLIB_IN_PKGCACHE_H
#endif