Fixup fromcvs/togit conversion
[minix-pkgsrc.git] / sysutils / fam / patches / patch-ae
blob8588f796b242111e66e56353caef70cd25d2c41b
1 $NetBSD: patch-ae,v 1.3 2004/03/28 22:00:05 minskim Exp $
3 --- src/FileSystem.c++.orig     2003-01-18 14:18:12.000000000 +0000
4 +++ src/FileSystem.c++  2004-11-08 15:39:34.558377000 +0000
5 @@ -22,14 +22,20 @@
6  
7  #include "FileSystem.h"
8  
9 -#include <mntent.h>
10 +#include "fam-mntent.h"
11  #include <string.h>
13  #include "Event.h"
15 +#if defined(HAVE_SYS_MNTTAB_H)
16 +FileSystem::FileSystem(const mnttab& mnt)
17 +    : mydir   (strcpy(new char[strlen(mnt.mnt_mountp) + 1], mnt.mnt_mountp)),
18 +      myfsname(strcpy(new char[strlen(mnt.mnt_special) + 1], mnt.mnt_special))
19 +#else
20  FileSystem::FileSystem(const mntent& mnt)
21      : mydir   (strcpy(new char[strlen(mnt.mnt_dir   ) + 1], mnt.mnt_dir   )),
22        myfsname(strcpy(new char[strlen(mnt.mnt_fsname) + 1], mnt.mnt_fsname))
23 +#endif
24  { }
26  FileSystem::~FileSystem()
27 @@ -40,9 +46,15 @@
28  }
30  bool
31 +#if defined(HAVE_SYS_MNTTAB_H)
32 +FileSystem::matches(const mnttab& mnt) const
34 +    return !strcmp(mydir, mnt.mnt_mountp) && !strcmp(myfsname, mnt.mnt_special);
35 +#else
36  FileSystem::matches(const mntent& mnt) const
37  {
38      return !strcmp(mydir, mnt.mnt_dir) && !strcmp(myfsname, mnt.mnt_fsname);
39 +#endif
40  }
42  void