[Openvas-discuss] ids_send.c:670: error: structure has no member named `s6_addr32'

Hans MAYER mayer at iiasa.ac.at
Thu Jun 17 09:19:43 CEST 2010


Dear Felix 

Many thanks for the tip, with this change it was possible to compile this part of openvas-libraries-3.0.5
I changed several files, see below 
I made it quick&dirty, maybe you can integrate the changes in a proper way for the next release. 

But in the meantime I am running against another error. 


gmake[3]: Entering directory `/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl'
/usr/local/bin/cmake -E cmake_progress_report /opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl/CMakeFiles 53
[  1%] Building C object CMakeFiles/openvas_nasl_static.dir/nasl_init.c.o
/usr/sfw/bin/gcc  -pipe  -Wall -D_FILE_OFFSET_BITS=64 -DLARGEFILE_SOURCE=1 -g -Wall -I/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl/../base -I/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl/../hg -I/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl/../misc -I/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl/../include   -DOPENVAS_STATE_DIR=\"/usr/local/var/lib/openvas\" -DVERSION=\"3.0.5.\" -DOPENVAS_SYSCONFDIR=\"/usr/local/etc/openvas\" -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include  -o CMakeFiles/openvas_nasl_static.dir/nasl_init.c.o   -c /opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl/nasl_init.c
In file included from /opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl/nasl_ip.h:6,
                 from /opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl/nasl_tcp.h:4,
                 from /opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/nasl/nasl_init.c:25:
/usr/include/netinet/ip.h:45: error: syntax error before "uchar_t"
/usr/include/netinet/ip.h:49: error: syntax error before "ip_len"
/usr/include/netinet/ip.h:50: error: syntax error before "ip_id"
/usr/include/netinet/ip.h:51: error: syntax error before "ip_off"
/usr/include/netinet/ip.h:54: error: syntax error before "ip_ttl"
/usr/include/netinet/ip.h:55: error: syntax error before "ip_p"
/usr/include/netinet/ip.h:56: error: syntax error before "ip_sum"
/usr/include/netinet/ip.h:58: error: syntax error before '}' token
/usr/include/netinet/ip.h:131: error: syntax error before "uchar_t"
/usr/include/netinet/ip.h:133: error: syntax error before "ipt_ptr"
................

And so on, there are a lot of following errors. 

Schoene Gruesse aus Wien
Hans

-- 




*** hg_add_hosts.c_orig Wed Jun 16 20:30:13 2010
--- hg_add_hosts.c      Wed Jun 16 20:32:27 2010
***************
*** 30,35 ****
--- 30,37 ----
  #include "hg_add_hosts.h"
  #include "hg_subnet.h"

+ #define s6_addr32 _S6_un._S6_u32
+
  /**
   * @file
   * Functions to add hosts to a hg_globals host list.





*** hg_subnet.c_orig    Tue Jan 26 09:11:50 2010
--- hg_subnet.c Wed Jun 16 20:32:53 2010
***************
*** 24,29 ****
--- 24,30 ----
  #include "hg_add_hosts.h"
  #include "hg_subnet.h"

+ #define s6_addr32 _S6_un._S6_u32

  void
  hg_gather_subnet_hosts (struct hg_globals * globals, struct hg_host * host)





*** hg_utils.c_orig     Thu Jan  7 14:22:17 2010
--- hg_utils.c  Wed Jun 16 20:33:03 2010
***************
*** 25,30 ****
--- 25,32 ----

  #include "hosts_gatherer.h"

+ #define s6_addr32 _S6_un._S6_u32
+
  /**
   * @brief Resolve an hostname.
   */





*** hosts_gatherer.c_orig       Thu Jan  7 09:31:35 2010
--- hosts_gatherer.c    Wed Jun 16 20:33:18 2010
***************
*** 33,38 ****
--- 33,39 ----
  #include "hg_filter.h"
  #include "hg_dns_axfr.h"

+ #define s6_addr32 _S6_un._S6_u32

  int
  hg_test_syntax (char * hostname, int flags)





*** .ids_send.c_orig    Fri Mar 26 00:55:17 2010
--- ids_send.c  Wed Jun 16 18:13:54 2010
***************
*** 37,42 ****
--- 37,45 ----
  #include <stdlib.h>
  #include <arpa/inet.h>

+ #include <inet/ip6.h>
+ #include <netinet/ip_compat.h>
+
  #include "arglists.h"
  #include "bpf_share.h"
  #include "resolve.h"





*** .ftp_funcs.c_orig   Tue Jun 15 16:53:34 2010
--- ftp_funcs.c Tue Jun 15 16:55:24 2010
***************
*** 26,31 ****
--- 26,32 ----
  #include <stdlib.h>
  #include <string.h>
  #include <stdio.h>
+ #include <sys/socket.h>

  /* this works for libc6 systems, unclear
   * wether it will not work on other systems */





*** .network.c_orig     Wed Dec  9 01:34:32 2009
--- network.c   Wed Jun 16 18:19:35 2010
***************
*** 50,55 ****
--- 50,58 ----
  #include "ids_send.h"
  #include "plugutils.h"

+ #include <sys/socket.h>
+ #define       s6_addr32       _S6_un._S6_u32
+
  #include <setjmp.h>

  #define TIMEOUT 20





*** .pcap.c_orig        Thu Apr  8 13:14:44 2010
--- pcap.c      Wed Jun 16 18:24:26 2010
***************
*** 36,41 ****
--- 36,44 ----
  #include "network.h"
  #include "config.h"

+ #include <sys/sockio.h>
+ #define       s6_addr32       _S6_un._S6_u32
+
  #define MAXROUTES 1024




*** .resolve.c_orig     Wed Dec 23 07:53:44 2009
--- resolve.c   Wed Jun 16 18:20:58 2010
***************
*** 23,28 ****
--- 23,30 ----

  #include "resolve.h"

+ #define       s6_addr32       _S6_un._S6_u32
+
  #ifndef INADDR_NONE
  #define INADDR_NONE 0xffffffff
  #endif




*** .www_funcs.c_orig   Wed Dec 23 07:53:44 2009
--- www_funcs.c Wed Jun 16 18:22:20 2010
***************
*** 26,31 ****
--- 26,33 ----
  #include "plugutils.h"
  #include "system.h"

+ #define       s6_addr32       _S6_un._S6_u32
+
  /*
   * This function implements "whisker like" IDS evasion tactics plus a couple
   * of other methods.






-----Original Message-----
From: Felix Wolfsteller [mailto:felix.wolfsteller at intevation.de] 
Sent: Tuesday, June 15, 2010 6:44 PM
To: Hans MAYER
Cc: 'openvas-discuss at wald.intevation.org'
Subject: Re: [Openvas-discuss] ids_send.c:670: error: structure has no member named `s6_addr32'

I remember doing something like
#define	s6_addr32	_S6_un._S6_u32

I am pretty sure that you will have to adjust the code in other places, too.
Please confirm and share other insights/patches regarding compilation  
on Solaris.

hth.

-- felix


Quoting Hans MAYER <mayer at iiasa.ac.at>:

>
> Dear all,
>
> I tried to compile openvas-libraries-3.0.5 on Solaris 5.10 with gcc  
> version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)
>
> The ./configure step is fine, but when I try to compile I run into  
> an error, see below
> Any ideas what I can do ?
>
> Kind regards
> Hans
>
>
>
> gmake[3]: Entering directory  
> `/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc'
> /usr/local/bin/cmake -E cmake_progress_report  
> /opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc/CMakeFiles  
> 7
> [  1%] Building C object CMakeFiles/openvas_misc_shared.dir/ids_send.c.o
> /usr/sfw/bin/gcc  -pipe -Dopenvas_misc_shared_EXPORTS -Wall -fPIC -g  
> -Wall -fPIC -fPIC  
> -I/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc/../include -I/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc/../base   -DOPENVAS_USERS_DIR=\"/usr/local/var/lib/openvas/users/\" -DOPENVAS_STATE_DIR=\"/usr/local/var/lib/openvas\" -DONF_DIR=\"/usr/local/etc/openvas\" -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include -o CMakeFiles/openvas_misc_shared.dir/ids_send.c.o   -c  
> /opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc/ids_send.c
> /opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc/ids_send.c: In function  
> `ids_open_sock_tcp':
> /opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc/ids_send.c:670: error: structure has no member named  
> `s6_addr32'
> gmake[3]: *** [CMakeFiles/openvas_misc_shared.dir/ids_send.c.o] Error 1
> gmake[3]: Leaving directory  
> `/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc'
> gmake[2]: *** [CMakeFiles/openvas_misc_shared.dir/all] Error 2
> gmake[2]: Leaving directory  
> `/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc'
> gmake[1]: *** [all] Error 2
> gmake[1]: Leaving directory  
> `/opt/usr/mayer/src/sol10_sparc/openvas_305/openvas-libraries-3.0.5/misc'
> gmake: *** [all] Error 2
>



----------------------------------------------------------------
This message was sent using IMP, the Internet Messaging Program.

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ip.h
URL: <http://lists.wald.intevation.org/pipermail/openvas-discuss/attachments/20100617/fbb5e08f/attachment.h>


More information about the Openvas-discuss mailing list