summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-libs/libnids/files/libnids-1.18-chksum.c-ebx.patch')
-rw-r--r--net-libs/libnids/files/libnids-1.18-chksum.c-ebx.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/net-libs/libnids/files/libnids-1.18-chksum.c-ebx.patch b/net-libs/libnids/files/libnids-1.18-chksum.c-ebx.patch
new file mode 100644
index 000000000000..5c7dc3fb1079
--- /dev/null
+++ b/net-libs/libnids/files/libnids-1.18-chksum.c-ebx.patch
@@ -0,0 +1,23 @@
+--- src/checksum.c.orig 2003-09-20 22:40:44.000000000 +0200
++++ src/checksum.c 2004-11-02 20:36:59.290981656 +0100
+@@ -29,6 +29,7 @@
+ movl 16(%esp),%ecx # Function arg: int len
+ movl 12(%esp),%esi # Function arg: u_char *buff*/
+
++" push %%ebx \n"
+ " testl $2, %%esi \n"
+ " jz 2f \n"
+ " subl $2, %%ecx \n"
+@@ -84,10 +85,10 @@
+ "5: movb (%%esi),%%cl \n"
+ "6: addl %%ecx,%%eax \n"
+ " adcl $0, %%eax \n"
+-"7: \n"
++"7: pop %%ebx \n"
+ : "=a"(sum)
+ : "0"(sum), "c"(len), "S"(buff)
+- : "bx", "dx");
++ : "dx");
+
+ return (sum);
+ }