use new ensc_wrappers/ headers
[util-vserver.git] / util-vserver / src / vunify-matchlist.c
index 5481f8c..2801aa3 100644 (file)
 #endif
 
 #include "vunify-matchlist.h"
-#include "wrappers.h"
 
 #include <fnmatch.h>
 #include <assert.h>
 
+#define ENSC_WRAPPERS_STDLIB   1
+#include <wrappers.h>
+
 bool
 MatchList_compare(struct MatchList const *list, char const *path)
 {
@@ -36,8 +38,8 @@ MatchList_compare(struct MatchList const *list, char const *path)
   //write(1, path, strlen(path));
   //write(1, "\n", 1);
   for (; ptr<end_ptr; ++ptr) {
-    assert(ptr->cmp!=0);
-    if ((ptr->cmp)(ptr->name, path)==0) {
+    if ((ptr->cmp==0 && strcmp(ptr->name, path)==0) ||
+       (ptr->cmp!=0 && (ptr->cmp)(ptr->name, path)==0)) {
       switch (ptr->type) {
        case stINCLUDE  :  res = true;  break;
        case stEXCLUDE  :  res = false; break;