The patch command on Solaris seems is compatible with diff format patch:
$patch -p0 < a.patch
Looks like a unified context diff.
File to patch:
The command is block and need you input patch file. So, I have to use gpatch, and gpatch work fine.
I google it and found, I am not the first one encounter this problem. Patching PHP on Solaris hosts (all patch utilities are not created equal!)