Subject: Re: Patching svr4-current code to work on 1.1 (i386)
To: None <netbsd-help@NetBSD.ORG>
From: Christos Zoulas <christos@deshaw.com>
List: netbsd-help
Date: 02/07/1996 04:14:20
In article <01BAF4A8.F6DA61A0@johnam.datastorm.com> root@beta.datastorm.com (John A. Maier) writes:
>I have been trying to take the compat/svr4 code from the current tree and put it in the 1.1 tree.
>
>Here is what I have done and what problems I am having.
>
>svr4_stat.c
>     In function bsd_to_svr4_stat(~)
>	 removed:
>     	    st4->st_atim = st->st_atimespec.tv_sec;
>          st4->st_mtim = st->st_mtimespec.tv_sec;
>          st4->st_ctim = st->st_ctimespec.tv_sec;
>     	 replaced with:
>          st4->st_atim = st->st_atimespec.ts_sec;
>          st4->st_mtim = st->st_mtimespec.ts_sec;
>          st4->st_ctim = st->st_ctimespec.ts_sec;
>
>svr4_signal.c
>     in function svr4_to_bsd_sigaltstack(~)
>       removed:
>          bss->ss_base = sss->ss_sp;
>       replaced with:
>	    bss->ss_sp = sss->ss_sp;
>
>     in function bsd_to_svr4_sigaltstack(~)
>       removed:
>          sss->ss_sp = bss->ss_sp;
>       replaced with:
>          sss->ss_sp = bss->ss_base;
>
>svr4_net.c
>     in function svr4_netopen(~)
>          <omited code>
>          struct socket *so;
>          <omited code>
>          so->so_internal = st;
>
>     Same issue in function svr4_netclose(~)
>
>     I checked sys/socketvar.h and there is no member
>     "so_internal" the closest member (I can figure out) is
>     so_state.  Since so_state seems to be a short where                     so_internal seems to be an int, replacing one with another,
>     via casting, doesn't seem to be the answer.

You need to change so_internal to so_tpcb. The rest is ok.

christos