File declaration.patch of Package scsh

---
 c/syscalls.c |    1 +
 configure.ac |    2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

--- configure.ac
+++ configure.ac	2019-03-15 10:55:11.045531002 +0000
@@ -54,7 +54,7 @@ AC_CHECK_FUNC(openpty, have_openpty=yes,
   AC_CHECK_LIB(util, openpty, have_openpty=yes need_libutil=yes)])
 if test "$have_openpty" = "yes"; then
   AC_DEFINE(HAVE_OPENPTY, 1, [Define to 1 if you have the 'openpty' function])
-  AC_CHECK_HEADERS(libutil.h util.h)
+  AC_CHECK_HEADERS(libutil.h pty.h util.h)
   if test "$need_libutil" = "yes"; then
     LIBS="${LIBS} -lutil"
   fi
--- c/syscalls.c
+++ c/syscalls.c	2019-03-15 10:56:35.827958828 +0000
@@ -10,6 +10,7 @@
 #include <sys/types.h>
 #include <sys/times.h>
 #include <sys/time.h>
+#include <time.h>
 #include <fcntl.h>		/* for O_RDWR */
 #include <sys/stat.h>
 #include <sys/param.h> /* For gethostname() */

--- c/syscalls.c
+++ c/syscalls.c
@@ -667,11 +667,10 @@
 s48_ref_t scm_gethostname(s48_call_t call)
 {
    char hostname[MAXHOSTNAMELEN+1];
     /* different OS's declare differently, so punt the prototype. */
-    int gethostname();
     int retval = gethostname(hostname, MAXHOSTNAMELEN);
     if (retval == -1) s48_os_error_2(call, "scm_gethostname", errno, 0);
     return s48_enter_byte_string_2(call, hostname);
 }
openSUSE Build Service is sponsored by