[Dnsmasq-discuss] The compile error of the latest git version.

Hongyi Zhao hongyi.zhao at gmail.com
Tue Mar 1 05:30:38 GMT 2016


2016-03-01 11:42 GMT+08:00 Kurt H Maier <khm at sciops.net>:
> On Tue, Mar 01, 2016 at 09:07:50AM +0800, Hongyi Zhao wrote:
>> Hi all,
>>
>> I try to compile the latest git version, but meet the following error:
>>
>> --------------
>> edns0.c: In function ‘add_pseudoheader’:
>> edns0.c:148:8: error: ‘islast’ undeclared (first use in this function)
>>         islast = 0;
>>         ^
>
> Looks like a typo in the last commit.  Try this:
>
> --- src-orig/edns0.c    2016-02-29 22:37:29.000000000 -0500
> +++ src/edns0.c 2016-02-29 22:38:29.573439000 -0500
> @@ -145,7 +145,7 @@
>           if (i + len > rdlen)
>             {
>               rdlen = 0;
> -             islast = 0;
> +             is_last = 0;
>               break;

I use the above code -- saved in a file named as patch.ednsc0.c -- to
patch the ednsc0.c, but meet the following error:

$ patch -p0 < patch.ednsc0.c
patching file src/edns0.c
Hunk #1 FAILED at 145.
1 out of 1 hunk FAILED -- saving rejects to file src/edns0.c.rej

Here is the content in the src/edns0.c.rej

$ cat src/edns0.c.rej
--- src-orig/edns0.c    2016-02-29 22:37:29.000000000 -0500
+++ src/edns0.c 2016-02-29 22:38:29.573439000 -0500
@@ -145,7 +145,7 @@
          if (i + len > rdlen)
            {
              rdlen = 0;
-             islast = 0;
+             is_last = 0;
              break;


So, I manually do the revision as the patch will do, i.e., change the line

islast = 0;

into

is_last = 0;

And it does the trick.

Thanks a lot.

>
>
> Hope this helps,
> khm
>
> _______________________________________________
> Dnsmasq-discuss mailing list
> Dnsmasq-discuss at lists.thekelleys.org.uk
> http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss



-- 
Hongyi Zhao <hongyi.zhao at gmail.com>
Xinjiang Technical Institute of Physics and Chemistry
Chinese Academy of Sciences
GnuPG DSA: 0xD108493



More information about the Dnsmasq-discuss mailing list