Operating System - HP-UX
1753604 Members
6178 Online
108797 Solutions
New Discussion

troubles building GNU netcat on HPUX 11.23

 
Sergey Akifiev_1
Frequent Advisor

troubles building GNU netcat on HPUX 11.23

i've got error when building gnu netcat-0.7.1 on
sergey@host:~/src/netcat-0.7.1$ uname -a
HP-UX host B.11.23 U ia64 1543514247 unlimited-user license

`./configure' step whent perfectly, but when doing `make' it bombs out with:
gcc -DLOCALEDIR=\"\/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I../lib/contrib -g -O2 -Wall -c `test -f 'udphelper.c' || echo './'`udphelper.c
In file included from /usr/include/sys/mp.h:53,
from /usr/include/sys/malloc.h:59,
from /usr/include/net/netmp.h:51,
from /usr/include/net/if.h:59,
from udphelper.c:33:
/usr/include/machine/sys/getppdp.h:65: error: array type has incomplete element type
udphelper.c: In function 'udphelper_sockets_open':
udphelper.c:115: error: storage size of 'nc_ifconf' isn't known
udphelper.c:186: error: 'struct lifreq' has no member named 'lifr_addr'
udphelper.c:190: error: 'struct lifreq' has no member named 'lifr_addr'
udphelper.c:115: warning: unused variable 'nc_ifconf'
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.
*** Error exit code 1

Stop.

i have gcc-4.1.1 installed from depot obtained from http://hpux.connectisl.com/.
google pointed me to a gcc mailing list, which said, that it is incompartibility of HPUX system headers and gcc4.
so how do i build this tool?
thanks in advance.
PS. i cannot achieve succes with /usr/bin/cc either.

 

 

P.S. This thread has been moved from General to HP-UX > languages. - Hp Forum Moderator

1 REPLY 1
JimUrsetto
Visitor

Re: troubles building GNU netcat on HPUX 11.23

The patch below works for me, HPUX behaves poorly when it comes to the lifconf macros.

 

*** netcat-0.7.1/src/udphelper.c.orig   Mon Oct 27 09:47:08 2003
--- netcat-0.7.1/src/udphelper.c        Wed Sep  4 11:45:20 2013
***************
*** 36,42 ****
  #endif

  /* Support Solaris extended GIFCONF */
! #ifndef SIOCGLIFCONF
  # define SIOCGLIFCONF SIOCGIFCONF
  # define lifc_len ifc_len
  # define lifc_buf ifc_buf
--- 36,42 ----
  #endif

  /* Support Solaris extended GIFCONF */
! #if !defined(SIOCGLIFCONF) || defined(__hpux)
  # define SIOCGLIFCONF SIOCGIFCONF
  # define lifc_len ifc_len
  # define lifc_buf ifc_buf
***************
*** 44,50 ****
  # define lifconf ifconf
  #endif

! #if !defined(SIOCGLIFADDR) || !defined(SIOCGLIFFLAGS)
  /* FIXME The following warning occurs on FreeBSD:
      udphelper.c:48: warning: `SIOCGLIFADDR' redefined
      /usr/include/sys/sockio.h:78: warning: this is the location of the previous definition
--- 44,50 ----
  # define lifconf ifconf
  #endif

! #if !defined(SIOCGLIFADDR) || !defined(SIOCGLIFFLAGS) || defined(__hpux)
  /* FIXME The following warning occurs on FreeBSD:
      udphelper.c:48: warning: `SIOCGLIFADDR' redefined
      /usr/include/sys/sockio.h:78: warning: this is the location of the previous definition