How to apply patche for NMAP


I have problems with NMAP software because i would like to run nmap on box where PPPoE connection is establish.

Starting Nmap 4.76 ( ) at 2009-01-23 13:27 CET
WARNING: Unable to find appropriate interface for system route to
nexthost: failed to determine route to

I found a patch but i don't have any idea how apply it ?
I'll appreciate any advice.
Here is a solution (thanks to user phoenix from

# cd /usr/ports/security/nmap
# make patch
<this will fetch the source, extract it, and patch it with any FreeBSD-specific patches)
# cd work/nmap-<version>/path/to/
# ee
<make changes as listed in the patch file>
# cd /usr/ports/security/nmap
# make build
<make sure there are no errors in the build>
# pkg_delete -xi nmap
# make install