]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/versionmatch.cc
don't send pkg from an unknown architecture via EDSP
[apt.git] / apt-pkg / versionmatch.cc
index e4fa0ea65f10fd2be0a3d4c737db3e5eefc89673..284098bdf275da546fd97bcc6ed6d86dfa667913 100644 (file)
 #include <apt-pkg/versionmatch.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/error.h>
+#include <apt-pkg/pkgcache.h>
+#include <apt-pkg/cacheiterators.h>
 
+#include <stddef.h>
+#include <stdlib.h>
+#include <string.h>
+#include <string>
 #include <stdio.h>
 #include <ctype.h>
 #include <fnmatch.h>
-#include <sys/types.h>
 #include <regex.h>
                                                                        /*}}}*/
 
@@ -181,9 +186,9 @@ pkgCache::VerIterator pkgVersionMatch::Find(pkgCache::PkgIterator Pkg)
 bool pkgVersionMatch::ExpressionMatches(const char *pattern, const char *string)
 {
    if (pattern[0] == '/') {
-      bool res = false;
       size_t length = strlen(pattern);
       if (pattern[length - 1] == '/') {
+        bool res = false;
         regex_t preg;
         char *regex = strdup(pattern + 1);
         regex[length - 2] = '\0';