[Iftop-users] Compile failure off HEAD

Mats Erik Andersson debian at gisladisker.se
Sun, 21 Aug 2011 12:19:18 +0200


--3V7upXqbjpZ4EhLz
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit

lördag den 20 augusti 2011 klockan 20:49 skrev Garrett Cooper detta:
> Hi,
>     Trying to determine whether or not the prerelease version has the
> same SI units bug as 0.17, I checked out the source from CVS HEAD and
> ran into this build bug on FreeBSD:
> 
> $ make all
> make  all-recursive
> Making all in config
> gcc -DHAVE_CONFIG_H -I.      -g -O2 -MT addr_hash.o -MD -MP -MF
> .deps/addr_hash.Tpo -c -o addr_hash.o addr_hash.c
> addr_hash.c: In function 'hash':
> addr_hash.c:46: error: 'struct in6_addr' has no member named 's6_addr32'
> addr_hash.c:54: error: 'struct in6_addr' has no member named 's6_addr32'
> *** Error code 1

The following patch has been sent to Paul Warren
just a few days ago. It restores compilability
and most functionality for

   GNU/Linux,
   GNU/kFreeBSD,
   FreeBSD,
   OpenBSD,
   OpenSolaris/NexentaCore.

These are the systems I have available.

Best regards,
  Mats Erik Andersson

--3V7upXqbjpZ4EhLz
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment; filename="portability_1_0_pre1.diff"

Index: addrs_ioctl.c
===================================================================
RCS file: /home/pdw/vcvs/repos/iftop/addrs_ioctl.c,v
retrieving revision 1.6
diff -r1.6 addrs_ioctl.c
22c22
<       || ( defined __GNUC__ && ! defined __linux__ )
---
>       || ( defined __GLIBC__ && ! defined __linux__ )
84c84
<       || ( defined __GNUC__ && ! defined __linux__ )
---
>       || ( defined __GLIBC__ && ! defined __linux__ )
Index: configure.in
===================================================================
RCS file: /home/pdw/vcvs/repos/iftop/configure.in,v
retrieving revision 1.29
diff -r1.29 configure.in
358c358
< #include <curses.h>
---
> #include <$curseslib.h>
Index: dlcommon.c
===================================================================
RCS file: /home/pdw/vcvs/repos/iftop/dlcommon.c,v
retrieving revision 1.1
diff -r1.1 dlcommon.c
27a28
> #include	<stdlib.h>
465c466
< static void
---
> void
Index: iftop.c
===================================================================
RCS file: /home/pdw/vcvs/repos/iftop/iftop.c,v
retrieving revision 1.56
diff -r1.56 iftop.c
22c22,24
< #include <net/bpf.h>
---
> #if defined __FreeBSD__ || defined __OpenBSD__
> #	include <net/bpf.h>
> #endif
Index: iftop.h
===================================================================
RCS file: /home/pdw/vcvs/repos/iftop/iftop.h,v
retrieving revision 1.19
diff -r1.19 iftop.h
15a16,25
> /* At least OpenBSD and NexentaCore do not
>  * define s6_addr32 for user land settings.
>  */
> #if !defined s6_addr32 && defined __sun__
> #	define s6_addr32 _S6_un._S6_u32
> #elif !defined s6_addr32 && \
> 		( defined __OpenBSD__ || defined __FreeBSD__ )
> #	define s6_addr32 __u6_addr.__u6_addr32
> #endif	/* !defined s6_addr32 */
> 
Index: ui.c
===================================================================
RCS file: /home/pdw/vcvs/repos/iftop/ui.c,v
retrieving revision 1.73
diff -r1.73 ui.c
9c9
< #include <curses.h>
---
> #include <ncurses.h>

--3V7upXqbjpZ4EhLz--