diff --git a/source/lib/replace/libreplace.m4 b/source/lib/replace/libreplace.m4 index e9b19b7..e430a7f 100644 --- a/source/lib/replace/libreplace.m4 +++ b/source/lib/replace/libreplace.m4 @@ -99,7 +99,7 @@ AC_CHECK_HEADERS(stdarg.h vararg.h) AC_CHECK_HEADERS(sys/socket.h netinet/in.h netdb.h arpa/inet.h) AC_CHECK_HEADERS(netinet/ip.h netinet/tcp.h netinet/in_systm.h netinet/in_ip.h) AC_CHECK_HEADERS(sys/sockio.h sys/un.h) - +AC_CHECK_HEADERS(stropts.h) dnl we need to check that net/if.h really can be used, to cope with hpux dnl where including it always fails diff --git a/source/lib/replace/system/network.h b/source/lib/replace/system/network.h index 5e648dc..4d9e9fd 100644 --- a/source/lib/replace/system/network.h +++ b/source/lib/replace/system/network.h @@ -81,6 +81,10 @@ #include "lib/socket_wrapper/socket_wrapper.h" #endif +#ifdef HAVE_STROPTS_H +#include +#endif + #ifdef REPLACE_INET_NTOA char *rep_inet_ntoa(struct in_addr ip); #define inet_ntoa rep_inet_ntoa diff --git a/source/smbd/chgpasswd.c b/source/smbd/chgpasswd.c index 4ec8452..5762fed 100644 --- a/source/smbd/chgpasswd.c +++ b/source/smbd/chgpasswd.c @@ -154,19 +154,19 @@ static int dochild(int master, const char *slavedev, const struct passwd *pass, DEBUG(3, ("More weirdness, could not open %s\n", slavedev)); return (False); } -#if defined(I_PUSH) && defined(I_FIND) +#if defined(TIOCSCTTY) + if (ioctl(slave, TIOCSCTTY, 0) < 0) + { + DEBUG(3, ("Error in ioctl call for slave pty\n")); + /* return(False); */ + } +#elif defined(I_PUSH) && defined(I_FIND) if (ioctl(slave, I_FIND, "ptem") == 0) { ioctl(slave, I_PUSH, "ptem"); } if (ioctl(slave, I_FIND, "ldterm") == 0) { ioctl(slave, I_PUSH, "ldterm"); } -#elif defined(TIOCSCTTY) - if (ioctl(slave, TIOCSCTTY, 0) < 0) - { - DEBUG(3, ("Error in ioctl call for slave pty\n")); - /* return(False); */ - } #endif /* Close master. */