As I did for 4.0beta1 on 2003-08-25, I would like to suggest some changes
in order to build 5.0beta3 on Solaris 7 (also x86) and possibly others.
*** This concerns building only. I have not loaded and tested the package. ***

The patch to SunOS5/prototype is repeated from 2003-08-25; it is required
for building the package of any Solaris version.

Chunk 1 of the patch to ip_compat.h is also repeated. I do not know for
which Solaris versions above 7 it is required or at least allowed.
Chunk 2 is not needed but prevents a lot of uio_t redefinition warnings in
Solaris 7 and 8 (do not know higher versions). Which Solaris versions require
the typedef here at all?

solaris.c: There is no DDI_NO_AUTODETACH in Solaris 7 and 8, and I could
not find it in the Solaris 9 online docs. Lacking docs, I do not know what
effects my patch actually has, but it is required to compile at least below
Solaris 9.

ip_fil_solaris.c: also repeated from 2003-08-25; required for Solaris 7,
allowed in all others.

Makefile: In my 3rd mail on 2003-08-25, I suggested an x86 workaround to
deactivate /usr/include/sys/promif.h. This can be done more easily, see
chunk 1 of the Makefile patch. I do not know whether it is also required
above Solaris 7 but will probably do no harm.

Here come the patches:

*** SunOS5/prototype.ORI        Sun Apr 27 08:37:32 2003
--- SunOS5/prototype    Mon Oct  6 11:45:44 2003
***************
*** 62,70 ****
  f none /usr/include/ipfilter/ip_nat.h=root/usr/include/ipfilter/ip_nat.h
  f none /usr/include/ipfilter/ip_proxy.h=root/usr/include/ipfilter/ip_proxy.h
  f none /usr/include/ipfilter/ip_state.h=root/usr/include/ipfilter/ip_state.h
! f none /usr/include/ipfilter/ip_state.h=root/usr/include/ipfilter/ip_htable.h
! f none /usr/include/ipfilter/ip_state.h=root/usr/include/ipfilter/ip_lookup.h
! f none /usr/include/ipfilter/ip_state.h=root/usr/include/ipfilter/ip_pool.h
  f none /opt/ipf/examples/example.1=root/opt/ipf/examples/example.1
  f none /opt/ipf/examples/example.2=root/opt/ipf/examples/example.2
  f none /opt/ipf/examples/example.3=root/opt/ipf/examples/example.3
--- 62,70 ----
  f none /usr/include/ipfilter/ip_nat.h=root/usr/include/ipfilter/ip_nat.h
  f none /usr/include/ipfilter/ip_proxy.h=root/usr/include/ipfilter/ip_proxy.h
  f none /usr/include/ipfilter/ip_state.h=root/usr/include/ipfilter/ip_state.h
! f none /usr/include/ipfilter/ip_htable.h=root/usr/include/ipfilter/ip_htable.h
! f none /usr/include/ipfilter/ip_lookup.h=root/usr/include/ipfilter/ip_lookup.h
! f none /usr/include/ipfilter/ip_pool.h=root/usr/include/ipfilter/ip_pool.h
  f none /opt/ipf/examples/example.1=root/opt/ipf/examples/example.1
  f none /opt/ipf/examples/example.2=root/opt/ipf/examples/example.2
  f none /opt/ipf/examples/example.3=root/opt/ipf/examples/example.3
*** ip_compat.h.ORI     Thu Sep 25 22:20:57 2003
--- ip_compat.h Mon Oct  6 12:04:46 2003
***************
*** 184,189 ****
--- 184,191 ----
  #  define     KRWLOCK_T               krwlock_t
  #  define     KMUTEX_T                kmutex_t
  #  include "pfil.h"
+ #  include <sys/socket.h>
+ #  include <net/if.h>
  #  include "qif.h"
  #  if SOLARIS2 >= 6
  #   if SOLARIS2 == 6
***************
*** 268,276 ****
  #  endif
  # endif
  
- # if SOLARIS2 < 10
- typedef       struct uio      uio_t;
- # endif
  typedef       int             ioctlcmd_t;
  
  # define OS_RECOGNISED 1
--- 270,275 ----
*** solaris.c.ORI       Sat Sep 27 13:47:11 2003
--- solaris.c   Mon Oct  6 12:32:19 2003
***************
*** 522,532 ****
--- 522,534 ----
        int *i32p;
        int err;
  
+ #ifdef DDI_NO_AUTODETACH
        if (ddi_prop_update_int(DDI_DEV_T_NONE, dip,
                                DDI_NO_AUTODETACH, 1) != DDI_PROP_SUCCESS) {
                cmn_err(CE_WARN, "!updating %s failed", DDI_NO_AUTODETACH);
                return DDI_FAILURE;
        }
+ #endif
  
        err = DDI_SUCCESS;
        ipft = ipf_tuneables;
*** ip_fil_solaris.c.ORI        Sat Sep 27 19:36:55 2003
--- ip_fil_solaris.c    Mon Oct  6 11:48:37 2003
***************
*** 838,844 ****
        switch (atype)
        {
        case FRI_BROADCAST :
! #if SOLARIS2 < 7
                sin.sin_addr.s_addr = ipif->ipif_broadcast_addr;
  #else
                sin.sin_addr.s_addr = ipif->ipif_brd_addr;
--- 838,844 ----
        switch (atype)
        {
        case FRI_BROADCAST :
! #if SOLARIS2 <= 7
                sin.sin_addr.s_addr = ipif->ipif_broadcast_addr;
  #else
                sin.sin_addr.s_addr = ipif->ipif_brd_addr;
***************
*** 848,854 ****
                sin.sin_addr.s_addr = ipif->ipif_pp_dst_addr;
                break;
        default :
! #if SOLARIS2 < 7
                sin.sin_addr.s_addr = ipif->ipif_local_addr;
  #else
                sin.sin_addr.s_addr = ipif->ipif_lcl_addr;
--- 848,854 ----
                sin.sin_addr.s_addr = ipif->ipif_pp_dst_addr;
                break;
        default :
! #if SOLARIS2 <= 7
                sin.sin_addr.s_addr = ipif->ipif_local_addr;
  #else
                sin.sin_addr.s_addr = ipif->ipif_lcl_addr;
*** Makefile.ORI        Thu Sep 18 02:58:10 2003
--- Makefile    Mon Oct  6 13:06:15 2003
***************
*** 19,24 ****
--- 19,25 ----
  DEBUG=-g
  # -O
  CFLAGS=-I$$(TOP)
+ # At least for Solaris 7_x86, add -D_SYS_PROMIF_H
  CPU=`uname -m`
  CPUDIR=`uname -s|sed -e 's@/@@g'`-`uname -r`-`uname -m`
  OBJ=.
***************
*** 66,72 ****
  #
  # Uncomment the next 3 lines if you want to view the state table a la top(1)
  # (requires that you have installed ncurses).
! #STATETOP_CFLAGS=-DSTATETOP
  #
  # Where to find the ncurses include files (if not in default path), 
  #
--- 67,73 ----
  #
  # Uncomment the next 3 lines if you want to view the state table a la top(1)
  # (requires that you have installed ncurses).
! STATETOP_CFLAGS=-DSTATETOP
  #
  # Where to find the ncurses include files (if not in default path), 
  #
***************
*** 75,81 ****
  #
  # How to link the ncurses library
  #
! #STATETOP_LIB=-lncurses
  #STATETOP_LIB=-L/usr/local/lib -lncurses
  
  #
--- 76,82 ----
  #
  # How to link the ncurses library
  #
! STATETOP_LIB=-lcurses
  #STATETOP_LIB=-L/usr/local/lib -lncurses
  
  #

Reply via email to