Home
My Page
Projects
OpenVAS

[#1233] hg_utils.c:49: error: 'struct in6_addr' has no member named 's6_addr32'

Date:
2010-01-05 03:10
Priority:
3
State:
Closed
Submitted by:
Ryan Schmidt (ryandesign)
Assigned to:
Nobody (None)
Architecture:
64 bits
Product:
OpenVAS
Operating System:
MacOS X
Component:
openvas-libraries
Version:
3.0.0
Severity:
blocker
Resolution:
Invalid
Hardware:
Macintosh
URL:
 
Summary:
hg_utils.c:49: error: 'struct in6_addr' has no member named 's6_addr32'

Detailed description
openvas-libraries 3.0.0 does not compile on Mac OS X 10.6.2. It says:





/usr/bin/gcc-4.2 -pipe -DHAVE_CONFIG_H -I. -I/opt/local/var/macports/build/_Users_rschmidt_macports_dports_security_openvas-libraries/work/openvas-libraries-3.0.0/include -I/opt/local/include -Wall -I../misc -c hg_utils.c -fno-common -DPIC -o .libs/hg_utils.o

hg_utils.c: In function 'hg_resolv':

hg_utils.c:49: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:50: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:51: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:52: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:52: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:52: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:52: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:70: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:71: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:72: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:73: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:73: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:73: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c:73: error: 'struct in6_addr' has no member named 's6_addr32'

hg_utils.c: In function 'hg_get_name_from_ip':

hg_utils.c:108: error: 'struct in6_addr' has no member named 's6_addr32'

make[1]: *** [hg_utils.o] Error 1





Here is a reference that says that s6_addr32 is not available on all platforms, which apparently includes Mac OS X:



http://seclists.org/nmap-dev/2009/q1/493

Followup

Message
Date: 2017-01-13 10:02
Sender: Michael Wiegand

Due to substantial code changes the function hg_dns_axfr_add_host no longer
exists, so the current compilation status on OS X is unknown.

s6_addr32 is now defined in a number of places for FreeBSD, presumably the
define can be adjusted to match other related platforms if required.
Date: 2010-01-21 03:00
Sender: Ryan Schmidt

Thanks for the s6_addr32 fix, Jonathan. More files than just hg/hosts_gatherer.h were affected, and I found it easier to fix them all at once by adding "-Ds6_addr32=__u6_addr.__u6_addr32" to my CFLAGS.

As you noted, this then leads to further errors including:

hg_dns_axfr.c:66: error: expected specifier-qualifier-list before 'HEADER'
hg_dns_axfr.c: In function 'hg_dns_axfr_add_host':
hg_dns_axfr.c:97: error: 'MAXDNAME' undeclared (first use in this function)
hg_dns_axfr.c:97: error: (Each undeclared identifier is reported only once
hg_dns_axfr.c:97: error: for each function it appears in.)
hg_dns_axfr.c:104: error: 'T_A' undeclared (first use in this function)

For these, I found a tip which led me to add "-DBIND_8_COMPAT" to my CFLAGS.

I then run into unrelated issues which I've filed as bug #1258.
Date: 2010-01-15 23:20
Sender: Jonathan Buschmann


Quick'n'dirty way of fixing this :

--- openvas-libraries-3.0.1/hg/hosts_gatherer.h 2010-01-07 10:13:49.000000000 +0100
+++ /Volumes/dat/jonthn/compile/openvas-libraries-3.0.1/hg/hosts_gatherer.h 2010-01-15 23:40:58.000000000 +0100
@@ -22,6 +22,8 @@
#include <netinet/in.h> /* for in_addr */
#include "arglists.h"

+#define s6_addr32 __u6_addr.__u6_addr32
+
#ifndef INADDR_NONE
#define INADDR_NONE 0xffffffff
#endif


But then another error pop up in `hg_dns_axfr.c` about HEADER, T_A, ... but that's another problem.

Attached Files:

Changes:

Field Old Value Date By
status_idOpen2017-01-13 10:02mwiegand
close_dateNone2017-01-13 10:02mwiegand
ResolutionNone2017-01-13 10:02mwiegand

This site is hosted by Intevation GmbH