Skip to content

Instantly share code, notes, and snippets.

BA steakknife

Block or report user

Report or block steakknife

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View patches.list
https://gist.githubusercontent.com/steakknife/946f6ee331512a269145b293cbe898cc/raw/bzip2-1.0.6-install_docs-1.patch
https://gist.githubusercontent.com/steakknife/eceda09cae0cdb4900bcd9e479bab9be/raw/bzip2recover-CVE-2016-3189.patch
https://gist.githubusercontent.com/steakknife/42feaa223adb4dd7c5c85f288794973c/raw/bzip2-man-page-location.patch
https://gist.githubusercontent.com/steakknife/94f8aa4bfa79a3f896a660bf4e973f72/raw/bzip2-shared-make-install.patch
https://gist.githubusercontent.com/steakknife/4faee8a657db9402cbeb579279156e84/raw/bzip2-pkg-config.patch
View bzip2-pkg-config.patch
diff --git a/Makefile b/Makefile
index 11bc446..1b8f964 100644
--- a/Makefile
+++ b/Makefile
@@ -12,6 +12,8 @@
# in the file LICENSE.
# ------------------------------------------------------------------
+VERSION=1.0.6
+
View bzip2-shared-make-install.patch
diff --git a/Makefile-libbz2_so b/Makefile-libbz2_so
index e58791b..1f0739b 100644
--- a/Makefile-libbz2_so
+++ b/Makefile-libbz2_so
@@ -26,6 +26,9 @@ CC=gcc
BIGFILES=-D_FILE_OFFSET_BITS=64
CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
+# Where you want it installed when you do 'make install'
+PREFIX=/usr/local
@steakknife
steakknife / bzip2-man-page-location.patch
Last active May 28, 2019
bzip2: $(PREFIX)/man -> $(PREFIX)/share/man
View bzip2-man-page-location.patch
diff --git a/Makefile b/Makefile
index 6de6e68..11bc446 100644
--- a/Makefile
+++ b/Makefile
@@ -72,8 +72,8 @@ test: bzip2
install: bzip2 bzip2recover
if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
- if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
- if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
View bzip2recover-CVE-2016-3189.patch
diff -up ./bzip2recover.c.old ./bzip2recover.c
--- ./bzip2recover.c.old 2016-03-22 08:49:38.855620000 +0100
+++ ./bzip2recover.c 2016-03-30 10:22:27.341430099 +0200
@@ -458,6 +458,7 @@ Int32 main ( Int32 argc, Char** argv )
bsPutUChar ( bsWr, 0x50 ); bsPutUChar ( bsWr, 0x90 );
bsPutUInt32 ( bsWr, blockCRC );
bsClose ( bsWr );
+ outFile = NULL;
}
if (wrBlock >= rbCtr) break;
View bzip2-1.0.6-install_docs-1.patch
Submitted By: Matthew Burgess <matthew@linuxfromscratch.org>
Date: 2007-01-31
Initial Package Version: 1.0.4
Upstream Status: Not submitted
Origin: Randy McMurchy & Steve Crosby
Description: Installs pre-formatted documentation
diff -Naur bzip2-1.0.4.orig/Makefile bzip2-1.0.4/Makefile
--- bzip2-1.0.4.orig/Makefile 2007-01-03 03:49:21.000000000 +0000
+++ bzip2-1.0.4/Makefile 2007-01-26 20:00:01.000000000 +0000
View foo.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
</head>
<body>
</body>
</html>
@steakknife
steakknife / inv_sqrt.c
Created Apr 5, 2019
Quake III fast invsqrt()
View inv_sqrt.c
/* https://www.beyond3d.com/content/articles/8 */
float InvSqrt (float x){
float xhalf = 0.5f*x;
int i = *(int*)&x;
i = 0x5f3759df - (i>>1);
x = *(float*)&i;
x = x*(1.5f - xhalf*x*x);
return x;
}
@steakknife
steakknife / q_rsqrt.c
Last active Apr 5, 2019
Quake 3 fast sqrt
View q_rsqrt.c
/* http://fabiensanglard.net/3dfx_sst1/index.html */
float Q_rsqrt(float number) {
long i;
float x2, y;
const float threehalfs = 1.5f;
x2 = number * 0.5f;
y = number;
i = * (long*) &y; // evil floating point bit level hacking
i = 0x5f3759df - ( i >> 1 ); // what the fuck?
View gist:615f08981c9b18271ec3600c6995a31a
Tue Mar 12 01:21:42 2019
*** Panic Report ***
panic(cpu 1 caller 0xffffff801a5dad90): "trying to interlock destroyed mutex (0xffffff8045132840)"@/BuildRoot/Library/Caches/com.apple.xbs/Sources/xnu/xnu-4903.241.1/osfmk/i386/locks_i386.c:2817
Backtrace (CPU 1), Frame : Return Address
0xffffff8035343690 : 0xffffff801a5aeb0d
0xffffff80353436e0 : 0xffffff801a6e8653
0xffffff8035343720 : 0xffffff801a6da07a
0xffffff8035343790 : 0xffffff801a55bca0
0xffffff80353437b0 : 0xffffff801a5ae527
You can’t perform that action at this time.