The pkgsrc directory probably will already have some patches in a directory called 'patches'.
You just add your own patch for the header file before compiling.
BTW I only have used pkgsrc once and that was quite some time ago, so I cannot give a detailed step by step approach