aboutsummaryrefslogtreecommitdiffstats
path: root/archivers/pxz/files
diff options
context:
space:
mode:
authormm <mm@FreeBSD.org>2010-11-23 18:26:40 +0800
committermm <mm@FreeBSD.org>2010-11-23 18:26:40 +0800
commit0e7d3b66d3c604c26c05a96892369d889b2d44e4 (patch)
tree6743616e83ea841ea14d2fc09f242c005dede6f1 /archivers/pxz/files
parentdf1f9133e8ea82c2a9e17a9eb2105adef67d6479 (diff)
downloadfreebsd-ports-gnome-0e7d3b66d3c604c26c05a96892369d889b2d44e4.tar.gz
freebsd-ports-gnome-0e7d3b66d3c604c26c05a96892369d889b2d44e4.tar.zst
freebsd-ports-gnome-0e7d3b66d3c604c26c05a96892369d889b2d44e4.zip
Parallel XZ is a compression utility that takes advantage of running LZMA
compression of different parts of an input file on multiple cores and processors simultaneously. Its primary goal is to utilize all resources to speed up compression time with minimal possible influence on compression ratio. WWW: http://jnovy.fedorapeople.org/pxz/
Diffstat (limited to 'archivers/pxz/files')
-rw-r--r--archivers/pxz/files/patch-pxz.c47
1 files changed, 47 insertions, 0 deletions
diff --git a/archivers/pxz/files/patch-pxz.c b/archivers/pxz/files/patch-pxz.c
new file mode 100644
index 000000000000..8878d8ea28c5
--- /dev/null
+++ b/archivers/pxz/files/patch-pxz.c
@@ -0,0 +1,47 @@
+--- pxz.c.orig 2010-11-23 10:35:25.720939440 +0100
++++ pxz.c 2010-11-23 10:46:28.910235910 +0100
+@@ -21,11 +21,17 @@
+
+ #include <string.h>
+ #include <stdio.h>
+-#include <stdio_ext.h>
++#ifndef __FreeBSD__
++#include <stdio_ext.h>
++#endif
+ #include <stdlib.h>
+ #include <inttypes.h>
+ #include <unistd.h>
+-#include <error.h>
++#ifdef __FreeBSD__
++#include <err.h>
++#else
++#include <error.h>
++#endif
+ #include <errno.h>
+ #include <sys/stat.h>
+ #include <sys/mman.h>
+@@ -40,6 +46,10 @@
+ #include <omp.h>
+ #endif
+
++#ifdef __FreeBSD__
++#define error errc
++#endif
++
+ #ifndef XZ_BINARY
+ #define XZ_BINARY "xz"
+ #endif
+@@ -119,6 +129,13 @@
+ { NULL, 0, NULL, 0 }
+ };
+
++#ifdef __FreeBSD__
++static size_t __fpending (FILE *fp)
++{
++ return (fp->_p - fp->_bf._base);
++}
++#endif
++
+ void __attribute__((noreturn)) run_xz( char **argv ) {
+ execvp(XZ_BINARY, argv);
+ error(0, errno, "execution of "XZ_BINARY" binary failed");