I'm created a SVN patch to port from a Linux server to AIX server.
The SVN generated patch is as below:
Index: cas/cm/cmsee.c
===================================================================
--- cas/cm/cmsee.c (revision 19)
+++ cas/cm/cmsee.c (working copy)
@@ -769,14 +769,23 @@
CE_CEXPFCT CE_VOID cm_seet(CE_VOID)
{
+#ifndef TRACE
+ TT_OWNTYPE *phh;
+ TT_OWNTYPE *phhe;
+#elif FINAL_CHECKS
TT_OWNTYPE *phh;
TT_OWNTYPE *phhe;
+#endif
TRACE(I,"cm_seet");
+#ifndef TRACE
phh = cm_fp->fp_hh_ptr;
phhe = phh + cm_fp->cp_hh_cnt;
-
+#elif FINAL_CHECKS
+ phh = bm_fp->fp_hh_ptr;
+ phhe = pht + bm_fp->fp_hh_cnt;
+#endif
TRACE(I, fstr("init: phh %x phhe %x\n", phh, phhe););
#ifdef FINAL_CHECKS
When I run the command
patch -p0 -i Modified.patch
I get the follow error:
Hmm... Looks like a unified context diff to me...
The text leading up to this was:
--------------------------
|Index: cas/cm/cmsee.c
|===================================================================
|--- cas/cm/cmsee.c (revision 19)
|+++ cas/cm/cmsee.c (working copy)
--------------------------
Patching file cas/cm/cmsee.c using Plan A...
Malformed patch at line 7: CE_CEXPFCT CE_VOID cm_seet(CE_VOID)
I tried Google and checked on StackExchange, but no solutions which could solve my problem. Can anyone help me here?
patchprovided in 5.3 and below do not support unified diffs, but later versions should. If you have an earlier version, you could build anotherpatch, such as GNU's, or generate non-unified diffspatchthat it's a unified diff, with the-uflag?-p0and the two-level directory structure confuses me; are you in thecas/cm/directory? Or should you use-p2?