70f76af789
ok sturm
30 lines
889 B
Plaintext
30 lines
889 B
Plaintext
$OpenBSD: patch-src_itdb_itunesdb_c,v 1.4 2007/03/17 21:54:16 ckuethe Exp $
|
|
--- src/itdb_itunesdb.c.orig Sun Jan 14 07:28:37 2007
|
|
+++ src/itdb_itunesdb.c Tue Mar 13 14:42:33 2007
|
|
@@ -122,7 +122,6 @@
|
|
#include <stdio.h>
|
|
#include <string.h>
|
|
#include <sys/stat.h>
|
|
-#include <sys/statvfs.h>
|
|
#include <sys/types.h>
|
|
#include <time.h>
|
|
#include <unistd.h>
|
|
@@ -5966,14 +5965,14 @@ static gboolean itdb_create_directories
|
|
dirnum = info->musicdirs;
|
|
if (dirnum == 0)
|
|
{ /* do a guess */
|
|
- struct statvfs stat;
|
|
- if (statvfs (mp, &stat) != 0)
|
|
+ struct stat sb;
|
|
+ if (stat (mp, &sb) != 0)
|
|
{ /* why should this fail !? */
|
|
dirnum = 20;
|
|
}
|
|
else
|
|
{
|
|
- gdouble size = ((gdouble)stat.f_blocks * stat.f_frsize) / 1073741824;
|
|
+ gdouble size = ((gdouble)sb.st_blocks * sb.st_size) / 1073741824;
|
|
if (size < 20) dirnum = 20;
|
|
else dirnum = 50;
|
|
}
|