I am presuming this is a patch with diff -u ( has - and +). Hunk 1 and 2 succeed at low offsets. To find out what is going on, look at hunk 3. As you read through the patch, watch iout for a line like
patching file somedir/foo.c
There might be many of these, so watch for the one relating to hunk 3
@@ -52,12 +115,16 @@
This is the beginning of a hunk. The usual invocation of patch is
diff -Naur mysoftware-version.orig mysoftware.version
The first being the original software and the second the same package with a bug fixed.
So That hunk begins at line 52 and goes on for 12 lines in the .orig file marked with a - and it goes in at 115 in the patched file and goes on for 16 lines. So 12 come out and 16 go in.
The usual reason patches fail is that they are already applied - you're fixing a bug that's already fixed. Next main reason is getting the p number wrong. The way I use patch is to put the patch beside the source tree, cd into the source tree, and run patch -p1 ../the_patch.patch
|