Subject: Patch to unbreak audio/tunepimp on DragonFly
To: None <tech-pkg@netbsd.org>
From: Jonathan Fosburgh <jfosburg@mdanderson.org>
List: tech-pkg
Date: 11/03/2005 12:07:24
--Boundary-00=_dHlaDHJkr3zCYgR
Content-Type: text/plain;
  charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

The patch is an addition to patch-ab to patch the lib/write.cpp file to 
provide a check for DragonFly in addition to NetBSD and FreeBSD.  Although 
this works for some reason it won't apply cleanly for me.  That is, the make 
patch stage requires me to supply the file (lib/write.cpp) and at that point 
it applies without errors or fuzz (that I can see).  I don't see anything 
wrong with the file though.

--Boundary-00=_dHlaDHJkr3zCYgR
Content-Type: text/x-diff;
  charset="us-ascii";
  name="patch-ab"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline;
	filename="patch-ab"

$NetBSD: patch-ab,v 1.3 2005/09/06 08:10:57 abs Exp $

=2D-- lib/write.cpp.orig	2004-03-25 22:12:43.000000000 +1200
+++ lib/write.cpp
@@ -40,7 +40,7 @@
 #  include <sys/stat.h>
 #  include <sys/types.h>
 #  include <fcntl.h>
=2D#  if defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__)
+#  if defined(__APPLE__) || defined(__NetBSD__) || defined(__FreeBSD__) ||=
 defined (__DragonFly__)
 #    include <sys/param.h>
 #    include <sys/mount.h>
 #  else

@@ -896,8 +896,17 @@ bool WriteThread::diskSpaceTest(const st
 #else
 //------------------------------------------------------------------------=
=2D--
=20
+#if defined(__NetBSD__) && (__NetBSD_Version__ >=3D 299000900) /* NetBSD 2=
=2E99.9 */
+#define HAVE_STATVFS 1
+#endif
+
 bool WriteThread::diskSpaceTest(const string &fileName, unsigned long file=
Size)
 {
+#if defined(HAVE_STATVFS)
+#define statfs statvfs
+#define f_bsize f_frsize
+#endif
+
     struct statfs stat;
=20
     string path =3D extractFilePath(fileName);

--Boundary-00=_dHlaDHJkr3zCYgR--