summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-util/fenris/files/fenris-0.07m-debian.patch')
-rw-r--r--dev-util/fenris/files/fenris-0.07m-debian.patch162
1 files changed, 162 insertions, 0 deletions
diff --git a/dev-util/fenris/files/fenris-0.07m-debian.patch b/dev-util/fenris/files/fenris-0.07m-debian.patch
new file mode 100644
index 000000000000..d47d2d3b7681
--- /dev/null
+++ b/dev-util/fenris/files/fenris-0.07m-debian.patch
@@ -0,0 +1,162 @@
+diff -ur fenris-0.07build3244/asmstring.h fenris-0.07build3244.fixed/asmstring.h
+--- fenris-0.07build3244/asmstring.h 2002-09-02 04:03:29.000000000 +0200
++++ fenris-0.07build3244.fixed/asmstring.h 2003-08-24 10:23:51.000000000 +0200
+@@ -521,10 +521,10 @@
+ {
+ if (!size)
+ return addr;
+- __asm__("repnz; scasb
+- jnz 1f
+- dec %%edi
+-1: "
++ __asm__("repnz; scasb\n"
++ "jnz 1f\n"
++ "dec %%edi\n"
++"1: "
+ : "=D" (addr), "=c" (size)
+ : "0" (addr), "1" (size), "a" (c));
+ return addr;
+diff -ur fenris-0.07build3244/build fenris-0.07build3244.fixed/build
+--- fenris-0.07build3244/build 2003-08-24 10:39:58.000000000 +0200
++++ fenris-0.07build3244.fixed/build 2003-08-24 10:22:05.000000000 +0200
+@@ -386,15 +386,15 @@
+
+ echo "break main" >.testerr 2>/dev/null
+ echo "x/2w getuid" >>.testerr 2>/dev/null
+-echo "x/16w __do_global_ctors_aux" >>.testerr 2>/dev/null
+-echo "x/16w __do_global_ctors_aux+1" >>.testerr 2>/dev/null
+-echo "x/16w __do_global_ctors_aux+2" >>.testerr 2>/dev/null
+-echo "x/16w __do_global_ctors_aux+3" >>.testerr 2>/dev/null
+-echo "x/16w __do_global_ctors_aux+4" >>.testerr 2>/dev/null
+-echo "x/16w __do_global_ctors_aux+5" >>.testerr 2>/dev/null
+-echo "x/16w __do_global_ctors_aux+6" >>.testerr 2>/dev/null
+-echo "x/16w __do_global_ctors_aux+7" >>.testerr 2>/dev/null
+-echo "x/16w __do_global_ctors_aux+8" >>.testerr 2>/dev/null
++echo "x/13w __do_global_ctors_aux" >>.testerr 2>/dev/null
++echo "x/13w __do_global_ctors_aux+1" >>.testerr 2>/dev/null
++echo "x/13w __do_global_ctors_aux+2" >>.testerr 2>/dev/null
++echo "x/13w __do_global_ctors_aux+3" >>.testerr 2>/dev/null
++echo "x/13w __do_global_ctors_aux+4" >>.testerr 2>/dev/null
++echo "x/13w __do_global_ctors_aux+5" >>.testerr 2>/dev/null
++echo "x/13w __do_global_ctors_aux+6" >>.testerr 2>/dev/null
++echo "x/13w __do_global_ctors_aux+7" >>.testerr 2>/dev/null
++echo "x/13w __do_global_ctors_aux+8" >>.testerr 2>/dev/null
+
+ echo "run" >>.testerr 2>/dev/null
+ echo "x open" >>.testerr 2>/dev/null
+@@ -404,7 +404,7 @@
+ ADDR=`grep open .gtmp 2>/dev/null|grep ^0x 2>/dev/null | awk '{print $1}' 2>/dev/null`
+
+ RES=`grep -F resolve .gtmp 2>/dev/null`
+-JMP=`grep -F getuid .gtmp 2>/dev/null`
++JMP=`grep ^0x .gtmp 2>/dev/null | head -n 1`
+
+ rm -f .testerr .testme
+
+diff -ur fenris-0.07build3244/config.h fenris-0.07build3244.fixed/config.h
+--- fenris-0.07build3244/config.h 2002-08-05 17:08:56.000000000 +0200
++++ fenris-0.07build3244.fixed/config.h 2003-08-24 10:23:10.000000000 +0200
+@@ -77,14 +77,12 @@
+ // This piece of code must remain intact and be included in all cases.
+
+ const static char spell[]=
+-
+-"
+-
+-A null pointer points to regions filled with dragons, demons, core
+-dumps, and numberless other foul creatures, all of which delight in
+-frolicing in thy program if thou disturb their sleep.
+-
+-";
++"\n"
++"\n"
++"A null pointer points to regions filled with dragons, demons, core\n"
++"dumps, and numberless other foul creatures, all of which delight in\n"
++"frolicing in thy program if thou disturb their sleep.\n"
++"\n";
+
+
+ #endif /* not _HAVE_CONFIG_H */
+diff -ur fenris-0.07build3244/fenris.c fenris-0.07build3244.fixed/fenris.c
+--- fenris-0.07build3244/fenris.c 2002-09-02 04:02:34.000000000 +0200
++++ fenris-0.07build3244.fixed/fenris.c 2003-08-24 10:33:58.000000000 +0200
+@@ -42,6 +42,23 @@
+
+ #define _GNU_SOURCE
+
++// Ok, this is hackish. I do not really want to copy whole
++// kernel stat struct here, so I include kernel headers. Unfortunately,
++// they differ somewhat, and collide with user-space headers, so we
++// have to tweak them.
++
++#define stat __kernel_stat
++#define stat64 __kernel_stat64
++#define old_stat __old_kernel_stat
++#define new_stat __kernel_stat
++
++#include <asm/stat.h>
++
++#undef stat
++#undef stat64
++#undef old_stat
++#undef new_stat
++
+ #include <sys/ptrace.h>
+ #include <sys/user.h>
+ #include <stdio.h>
+@@ -78,24 +95,6 @@
+ #include <bfd.h>
+ //#include <libiberty.h>
+
+-
+-// Ok, this is hackish. I do not really want to copy whole
+-// kernel stat struct here, so I include kernel headers. Unfortunately,
+-// they differ somewhat, and collide with user-space headers, so we
+-// have to tweak them.
+-
+-#define stat __kernel_stat
+-#define stat64 __kernel_stat64
+-#define old_stat __old_kernel_stat
+-#define new_stat __kernel_stat
+-
+-#include <asm/stat.h>
+-
+-#undef stat
+-#undef stat64
+-#undef old_stat
+-#undef new_stat
+-
+ #include "config.h"
+ #include "fenris.h"
+ #include "ioctls.h"
+Only in fenris-0.07build3244.fixed: PLT.txt
+diff -ur fenris-0.07build3244/ragnarok.c fenris-0.07build3244.fixed/ragnarok.c
+--- fenris-0.07build3244/ragnarok.c 2002-09-02 04:11:24.000000000 +0200
++++ fenris-0.07build3244.fixed/ragnarok.c 2003-08-24 10:38:18.000000000 +0200
+@@ -1709,15 +1709,14 @@
+
+ }
+
+-const static char spell2[] = "
+-
+-
+-It cannot be seen, cannot be felt,
+-Cannot be heard, cannot be smelt.
+-It lies behind stars and under hills,
+-And empty holes it fills.
+-It comes first and follows after,
+-Ends life, kills laughter.
+-
+-
+-";
++const static char spell2[] = "\n"
++"\n"
++"\n"
++"It cannot be seen, cannot be felt,\n"
++"Cannot be heard, cannot be smelt.\n"
++"It lies behind stars and under hills,\n"
++"And empty holes it fills.\n"
++"It comes first and follows after,\n"
++"Ends life, kills laughter.\n"
++"\n"
++"\n";