summaryrefslogtreecommitdiff
path: root/audio/sox/patches/patch-ak
diff options
context:
space:
mode:
Diffstat (limited to 'audio/sox/patches/patch-ak')
-rw-r--r--audio/sox/patches/patch-ak21
1 files changed, 21 insertions, 0 deletions
diff --git a/audio/sox/patches/patch-ak b/audio/sox/patches/patch-ak
new file mode 100644
index 00000000000..76dc6fadaaf
--- /dev/null
+++ b/audio/sox/patches/patch-ak
@@ -0,0 +1,21 @@
+$NetBSD: patch-ak,v 1.1 2010/12/27 05:32:49 obache Exp $
+
+* On DragonFly, FILE is hidden, only allowed to modify in __FILE_public.
+
+--- src/formats.c.orig 2010-01-02 00:07:28.000000000 +0000
++++ src/formats.c
+@@ -397,8 +397,14 @@ static void UNUSED rewind_pipe(FILE * fp
+ /* _FSTDIO is for Torek stdio (i.e. most BSD-derived libc's)
+ * In theory, we no longer need to check _NEWLIB_VERSION or __APPLE__ */
+ #if defined _FSTDIO || defined _NEWLIB_VERSION || defined __APPLE__
++# ifdef __DragonFly__
++ struct __FILE_public *fpp = (struct __FILE_public *)fp;
++ fpp->_p -= AUTO_DETECT_SIZE;
++ fpp->_r += AUTO_DETECT_SIZE;
++# else
+ fp->_p -= AUTO_DETECT_SIZE;
+ fp->_r += AUTO_DETECT_SIZE;
++# endif
+ #elif defined __GLIBC__
+ fp->_IO_read_ptr = fp->_IO_read_base;
+ #elif defined _MSC_VER || defined __MINGW_H || defined _ISO_STDIO_ISO_H