s3:lib/sysquotas: fix usage of SMB_STRUCT_STAT (struct stat_ex).
authorMichael Adam <obnox@samba.org>
Mon, 29 Jun 2009 14:11:13 +0000 (16:11 +0200)
committerMichael Adam <obnox@samba.org>
Mon, 29 Jun 2009 14:51:53 +0000 (16:51 +0200)
This fixes the build with quotas / configure time detection
of sys_quota interface.

Michael

source3/lib/sysquotas.c

index 5ee199de22dd60548afcaed37490aedc6c51c9b5..7eed0cadf9b762fdc6b1c771fde130e7a5566555 100644 (file)
@@ -63,7 +63,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
        if ( sys_stat(path, &S) == -1 )
                return (-1);
 
-       devno = S.st_dev ;
+       devno = S.st_ex_dev ;
 
        fp = setmntent(MOUNTED,"r");
        if (fp == NULL) {
@@ -74,7 +74,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
                if ( sys_stat(mnt->mnt_dir,&S) == -1 )
                        continue ;
 
-               if (S.st_dev == devno) {
+               if (S.st_ex_dev == devno) {
                        (*mntpath) = SMB_STRDUP(mnt->mnt_dir);
                        (*bdev) = SMB_STRDUP(mnt->mnt_fsname);
                        (*fs)   = SMB_STRDUP(mnt->mnt_type);
@@ -118,7 +118,7 @@ static int sys_path_to_bdev(const char *path, char **mntpath, char **bdev, char
                return ret;
        }
        
-       if ((ret=devnm(S_IFBLK, S.st_dev, dev_disk, 256, 1))!=0) {
+       if ((ret=devnm(S_IFBLK, S.st_ex_dev, dev_disk, 256, 1))!=0) {
                return ret;     
        }