[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] inetutils-1.5 build failed on Solaris 2.6 and 2.8
From: |
Alfred M. Szmidt |
Subject: |
Re: [bug-inetutils] inetutils-1.5 build failed on Solaris 2.6 and 2.8 |
Date: |
Sun, 5 Nov 2006 01:29:21 +0100 (CET) |
Hi!
Thanks for the bug report, could you try this patch on your platform
and report back to us? You will need to have automake >= 1.9 and
autoconf >= 2.59 installed, and run the command: ./autogen.sh, to
regenerate the scripts before you run ./configure.
Thanks!
(If this is a duplicate of a previous message, my apologise)
2006-10-26 Alfred M. Szmidt <address@hidden>
* configure.ac: Check for sighandler_t and __sighandler_t.
* libinetutils/setsig.c (SIGHANDLER_T): New macro.
Use it in function declarations.
Index: configure.ac
===================================================================
RCS file: /cvsroot/inetutils/inetutils/configure.ac,v
retrieving revision 1.33
diff -p -u -u -r1.33 configure.ac
--- configure.ac 21 Oct 2006 14:28:32 -0000 1.33
+++ configure.ac 5 Nov 2006 00:26:21 -0000
@@ -112,6 +112,7 @@ IU_ENABLE_CLIENT(telnet)
@@ -477,8 +478,10 @@ AC_CHECK_TYPES(struct if_nameindex, , ,
#include <sys/socket.h>
#include <net/if.h>])
-dnl sig_t is the type of a signal handler (4.4BSD)
-AC_CHECK_TYPES(sig_t, , ,
+dnl sighandler_t is the type of the signal handler on GNU variants,
+dnl sig_t is the type of a signal handler on 4.4BSD's,
+dnl other systems use __sighandler_t.
+AC_CHECK_TYPES([sighandler_t, sig_t, __sighandler_t], , ,
[#include <sys/types.h>
#include <signal.h> ])
Index: libinetutils/setsig.c
===================================================================
RCS file: /cvsroot/inetutils/inetutils/libinetutils/setsig.c,v
retrieving revision 1.3
diff -p -u -u -r1.3 setsig.c
--- libinetutils/setsig.c 21 Oct 2006 15:24:20 -0000 1.3
+++ libinetutils/setsig.c 5 Nov 2006 00:26:21 -0000
@@ -28,10 +28,20 @@
#include <signal.h>
+#ifdef HAVE_SIGHANDLER_T
+# define SIGHANDLER_T sighandler_t
+#elif HAVE_SIG_T
+# define SIGHANDLER_T sig_t
+#elif HAVE___SIGHANDLER_T
+# define SIGHANDLER_T __sighandler_t
+#else
+# error "unknown sighandler type, please report this to <address@hidden>"
+#endif
+
/* This is exactly like the traditional signal function, but turns on the
SA_RESTART bit where possible. */
-sig_t
-setsig (int sig, sig_t handler)
+SIGHANDLER_T
+setsig (int sig, SIGHANDLER_T handler)
{
#ifdef HAVE_SIGACTION
struct sigaction sa;
- Re: [bug-inetutils] inetutils-1.5 build failed on Solaris 2.6 and 2.8,
Alfred M. Szmidt <=