handshake-org / libhns

C library for resolving handshake names (fork of c-ares)
Other
21 stars 3 forks source link

HAVE_ARPA_NAMESER_COMPAT_H on Debian 9.5 64-bit #2

Open rheaplex opened 5 years ago

rheaplex commented 5 years ago

Clone and build:

git clone https://github.com/handshake-org/libhns
cd libhns
./buildconf
./configure
make

Output of interest:

  CC       hdig-hdig.o
hdig.c:150:17: error: ‘T_TLSA’ undeclared here (not in a function)
   { "TLSA",     T_TLSA },
                 ^~~~~~
hdig.c:151:17: error: ‘T_SMIMEA’ undeclared here (not in a function)
   { "SMIMEA",   T_SMIMEA },
                 ^~~~~~~~
hdig.c:152:19: error: ‘T_OPENPGPKEY’ undeclared here (not in a function)
   { "OPENPGPKEY", T_OPENPGPKEY },
                   ^~~~~~~~~~~~
Makefile:1739: recipe for target 'hdig-hdig.o' failed

These values are defined in nameser.h, and conditionalized on constants in hns_config.h.

Edit hns_config.h so that these constants are not defined:

/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
//#define HAVE_ARPA_NAMESER_COMPAT_H 1

/* Define to 1 if you have the <arpa/nameser.h> header file. */
//#define HAVE_ARPA_NAMESER_H 1

The code now compiles OK.

But arpa/nameser.h and arpa/nameser_compat.h exists:

$ ls /usr/include/arpa
ftp.h  inet.h  nameser_compat.h  nameser.h  telnet.h  tftp.h

The T_ types used in htdig.c are not defined in them, though.

james-stevens commented 4 years ago

Same compiler errors on Slackware 14.2, but I do have those defined enabled

/* Define to 1 if you have the <arpa/nameser_compat.h> header file. */
#define HAVE_ARPA_NAMESER_COMPAT_H 1

/* Define to 1 if you have the <arpa/nameser.h> header file. */
#define HAVE_ARPA_NAMESER_H 1

It may be that whatever libs I have are too old, Slackware can be like that

T_DNSKEY is defined, but not in arpa/nameser.h, so I'll need to do some more digging

As they are data types it can't handle, I'm just going to remove them for now