--- smbd/chgpasswd.c.orig 2008-04-10 10:08:15.000000000 +0200 +++ smbd/chgpasswd.c 2008-04-10 10:20:26.000000000 +0200 @@ -154,7 +154,7 @@ DEBUG(3, ("More weirdness, could not open %s\n", slavedev)); return (False); } -#if defined(TIOCSCTTY) +#if defined(TIOCSCTTY) && !defined(SUNOS5) if (ioctl(slave, TIOCSCTTY, 0) < 0) { DEBUG(3, ("Error in ioctl call for slave pty\n"));