Problem while patching a file

Lowell Gilbert freebsd-questions-local at
Tue Nov 29 13:45:19 GMT 2005

"Guillaume R." <raimondeau at> writes:

> I'm trying to install the last version of emacs (to test Gnus!) on my
> box. I've got a compil error, I made a search and found that thread:
> By reading the thread I could deduce that this patch seems to work
> fine.

By reading that thread, *I* conclude that the patch is completely
unnecesssary today.

The emacs port is building fine on the build cluster, on all supported
releases.  So the compile error is strictly local to you.

>       I decided to apply it. And here is my problem: I don't know how
> to patch correctly a file i suppose coz when i type:
> patch src/xterm.c < mypatch.patch

Leave out the filename there.  As the manual says, you usually just
use "patch < patchfile".

> Then the patch is not include in the file but simply copied at the top of it.
> Could someone explain me how to patch correctly a file? And especially
> where i could find some docs on diff/patch commands (apart man)?

If you don't want to read the actual manual for the program, then it's
unlikely any other documentation will help you either.  Just stick
with the FreeBSD ports collection and let other people do the porting
work for you.

Good luck.

More information about the freebsd-questions mailing list