[Bradford] How to apply git patch

Devo Too mike.goodman at devotoo.org.uk
Fri Jan 10 20:22:37 UTC 2020


Hi Folks,

I've been sent a git patch by the developer of dhcpcd. What on earth do 
I do with it? I can't even make out if the first line is part of the 
patch or a command and web searches are confusing rather then enlightening.

Here are the first few lines. What follow those are definitely part of 
the patch itself.

diff --git a/src/ipv6.c b/src/ipv6.c
index c49300c1..92403912 100644
--- a/src/ipv6.c
+++ b/src/ipv6.c
@@ -1554,7 +1554,9 @@ ipv6_newaddr(struct interface *ifp, const struct 
in6_addr *addr,
         tempaddr = false;
  #endif

Is this correct and if not, what is correct:

The first line is the command to run - or the first 4 lines?

The rest is the patch, which I should save as a standard file with - 
what name? - in /root, before running the command?

Git is not installed but I understand the patch command should be able 
to handle it. Is that correct?

Also, the line which contains "const struct" looks questionable to me. 
Is this correct code or a typo creating gobbledegook?

The responder with the sensible, working answer will be entitled to a 
drink from me on Tuesday evening after the LUG.

Cheers,

Mike



More information about the Bradford mailing list