Subject: can't compile vmware-module3 in -current
To: None <pkgsrc-users@NetBSD.org>
From: =?ISO-8859-1?Q?C=E9sar_Catri=E1n_Carre=F1o?= <ccatrian@eml.cc>
List: pkgsrc-users
Date: 08/19/2006 11:24:01
--Signature=_Sat__19_Aug_2006_11_24_01_-0400_meq6NbauaSXkbEt3
Content-Type: text/plain; charset=ISO-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

Can't compile vmware-module3 in -current without suser(9).
...
#   compile  linuxrtc/rtc.o
cc -O2 -ffreestanding  -fno-strict-aliasing -Wno-pointer-sign -Wall -Wstric=
t-prototypes -Wmissing-prototypes -Wpointer-arith -Wno-sign-compare -Wno-tr=
aditional -Wreturn-type -Wswitch -Wshadow     -nostdinc -nostdinc -I. -I/pk=
g_comp/obj/pkgsrc/emulators/vmware-module3/default/vmware-netbsd-3.2.1.8/so=
urce/linuxrtc -isystem /usr/src/sys -isystem /usr/src/sys/arch -isystem /us=
r/src/sys/../common/include -D_KERNEL -D_LKM  -c    rtc.c
rtc.c: In function 'rtc_open':
rtc.c:143: warning: implicit declaration of function 'suser'
rtc.c:143: error: 'struct proc' has no member named 'p_ucred'
*** Error code 1

This is the code:

static int
rtc_open(dev_t dev, int flag, int mode, struct ENTRYARG *l)
{      =20
        if (rtc_sc.sc_flags & RTC_OPEN)
                return EBUSY;

        if (suser(LWP2PROC(l)->p_ucred, &LWP2PROC(l)->p_acflag) !=3D 0)
                return EPERM;

        rtc_sc.sc_flags =3D RTC_OPEN;
        rtc_sc.sc_freq =3D 1000000 / hz;

        return 0;
}

AFAIK, suser(9) is being replaced with kauth(9) framework.

Regards

--
C=E9sar Catri=E1n Carre=F1o

--Signature=_Sat__19_Aug_2006_11_24_01_-0400_meq6NbauaSXkbEt3
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (NetBSD)

iD8DBQFE5y0f0CA0DpFTlnERAhZkAKCau0YddnYLBbYolUe34W/Zivc0wQCfbvn4
BVUzIfrKB5GXP0BcSy1s5w0=
=TPYX
-----END PGP SIGNATURE-----

--Signature=_Sat__19_Aug_2006_11_24_01_-0400_meq6NbauaSXkbEt3--