Discussion:
[Dnsmasq-discuss] The compile error of the latest git version.
Hongyi Zhao
2016-03-01 01:07:50 UTC
Permalink
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;
^
edns0.c:148:8: note: each undeclared identifier is reported only once
for each function it appears in
/home/werner/software/anti-gfw/anti-DNS-cache-poisoning/dnsmasq/dnsmasq.git/Makefile:157:
recipe for target 'edns0.o' failed
make[1]: *** [edns0.o] Error 1
make[1]: Leaving directory
'/home/werner/software/anti-gfw/anti-DNS-cache-poisoning/dnsmasq/dnsmasq.git/src'
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
--------------

Any hints?

Regards
--
Hongyi Zhao <***@gmail.com>
Xinjiang Technical Institute of Physics and Chemistry
Chinese Academy of Sciences
GnuPG DSA: 0xD108493
Kurt H Maier
2016-03-01 03:42:02 UTC
Permalink
Post by Hongyi Zhao
Hi all,
--------------
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;


Hope this helps,
khm
Hongyi Zhao
2016-03-01 05:30:38 UTC
Permalink
Post by Kurt H Maier
Post by Hongyi Zhao
Hi all,
--------------
edns0.c:148:8: error: ‘islast’ undeclared (first use in this function)
islast = 0;
^
--- 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.
Post by Kurt H Maier
Hope this helps,
khm
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
--
Hongyi Zhao <***@gmail.com>
Xinjiang Technical Institute of Physics and Chemistry
Chinese Academy of Sciences
GnuPG DSA: 0xD108493
Simon Kelley
2016-03-01 15:25:32 UTC
Permalink
Fixed now.


Cheers,

Simon.
Post by Hongyi Zhao
Hi all,
--------------
edns0.c:148:8: error: ‘islast’ undeclared (first use in this function)
islast = 0;
^
edns0.c:148:8: note: each undeclared identifier is reported only once
for each function it appears in
recipe for target 'edns0.o' failed
make[1]: *** [edns0.o] Error 1
make[1]: Leaving directory
'/home/werner/software/anti-gfw/anti-DNS-cache-poisoning/dnsmasq/dnsmasq.git/src'
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
--------------
Any hints?
Regards
Continue reading on narkive:
Loading...