Small fixes so tinc compiles out of the box on SunOS 5.8
This commit is contained in:
parent
8d472a415e
commit
5eca9520d9
10 changed files with 68 additions and 77 deletions
16
configure.in
16
configure.in
|
@ -1,6 +1,6 @@
|
|||
dnl Process this file with autoconf to produce a configure script.
|
||||
|
||||
dnl $Id: configure.in,v 1.13.2.58 2002/09/09 19:39:53 guus Exp $
|
||||
dnl $Id: configure.in,v 1.13.2.59 2002/09/15 14:55:53 guus Exp $
|
||||
|
||||
AC_PREREQ(2.53)
|
||||
AC_INIT(src/tincd.c)
|
||||
|
@ -86,8 +86,13 @@ dnl Checks for libraries.
|
|||
dnl Checks for header files.
|
||||
AC_HEADER_STDC
|
||||
AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h stdint.h strings.h syslog.h unistd.h \
|
||||
net/ethernet.h net/if.h netinet/in_systm.h netinet/ip.h netinet/tcp.h \
|
||||
sys/file.h sys/ioctl.h sys/param.h sys/time.h])
|
||||
sys/file.h sys/ioctl.h sys/param.h sys/time.h netinet/in_systm.h])
|
||||
AC_CHECK_HEADERS([net/ethernet.h net/if.h netinet/ip.h netinet/tcp.h], [], [],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif])
|
||||
|
||||
dnl Checks for typedefs, structures, and compiler characteristics.
|
||||
AC_C_CONST
|
||||
|
@ -128,8 +133,7 @@ AC_FUNC_MEMCMP
|
|||
AC_FUNC_ALLOCA
|
||||
AC_TYPE_SIGNAL
|
||||
AC_CHECK_FUNCS([asprintf daemon fcloseall flock ftime get_current_dir_name \
|
||||
putenv select strdup strerror strsignal strtol unsetenv \
|
||||
freeaddrinfo gai_strerror getaddrinfo getnameinfo mlockall])
|
||||
putenv select strdup strerror strsignal strtol unsetenv mlockall])
|
||||
jm_FUNC_MALLOC
|
||||
jm_FUNC_REALLOC
|
||||
|
||||
|
@ -142,6 +146,8 @@ AC_CHECK_FUNC(gethostbyname, [], [
|
|||
AC_CHECK_LIB(nsl, gethostbyname)
|
||||
])
|
||||
|
||||
AC_CHECK_FUNCS([freeaddrinfo gai_strerror getaddrinfo getnameinfo])
|
||||
|
||||
AC_CACHE_SAVE
|
||||
|
||||
dnl These are defined in files in m4/
|
||||
|
|
|
@ -11,9 +11,11 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
#include <netinet/in.h>
|
||||
#include <sys/socket.h>
|
||||
#include <netinet/in.h>
|
||||
#include <arpa/inet.h>
|
||||
#include <netdb.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
22
src/net.c
22
src/net.c
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: net.c,v 1.35.4.181 2002/09/09 22:32:39 guus Exp $
|
||||
$Id: net.c,v 1.35.4.182 2002/09/15 14:55:53 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -25,16 +25,6 @@
|
|||
#include <errno.h>
|
||||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -49,6 +39,16 @@
|
|||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#include <netinet/in.h>
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
|
||||
#include <openssl/rand.h>
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: net_packet.c,v 1.1.2.23 2002/09/09 22:32:44 guus Exp $
|
||||
$Id: net_packet.c,v 1.1.2.24 2002/09/15 14:55:53 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -26,15 +26,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -49,6 +40,15 @@
|
|||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
|
||||
#include <openssl/rand.h>
|
||||
#include <openssl/evp.h>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: net_setup.c,v 1.1.2.26 2002/09/09 22:32:44 guus Exp $
|
||||
$Id: net_setup.c,v 1.1.2.27 2002/09/15 14:55:53 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -26,15 +26,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -49,6 +40,15 @@
|
|||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
|
||||
#include <openssl/pem.h>
|
||||
#include <openssl/rsa.h>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: net_socket.c,v 1.1.2.21 2002/09/09 22:32:44 guus Exp $
|
||||
$Id: net_socket.c,v 1.1.2.22 2002/09/15 14:55:53 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -26,15 +26,6 @@
|
|||
#include <fcntl.h>
|
||||
#include <netdb.h>
|
||||
#include <netinet/in.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -49,6 +40,15 @@
|
|||
#include <arpa/inet.h>
|
||||
#include <sys/socket.h>
|
||||
#include <net/if.h>
|
||||
#ifdef HAVE_NETINET_IN_SYSTM_H
|
||||
#include <netinet/in_systm.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_IP_H
|
||||
#include <netinet/ip.h>
|
||||
#endif
|
||||
#ifdef HAVE_NETINET_TCP_H
|
||||
#include <netinet/tcp.h>
|
||||
#endif
|
||||
|
||||
#include <utils.h>
|
||||
#include <xalloc.h>
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: process.c,v 1.1.2.48 2002/09/10 09:40:25 guus Exp $
|
||||
$Id: process.c,v 1.1.2.49 2002/09/15 14:55:53 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -370,9 +370,7 @@ RETSIGTYPE sigint_handler(int a)
|
|||
debug_lvl = saved_debug_lvl;
|
||||
saved_debug_lvl = 0;
|
||||
} else {
|
||||
syslog(LOG_NOTICE,
|
||||
_
|
||||
("Temporarily setting debug level to 5. Kill me with SIGINT again to go back to level %d."),
|
||||
syslog(LOG_NOTICE, _("Temporarily setting debug level to 5. Kill me with SIGINT again to go back to level %d."),
|
||||
debug_lvl);
|
||||
saved_debug_lvl = debug_lvl;
|
||||
debug_lvl = 5;
|
||||
|
@ -469,9 +467,7 @@ void setup_signals(void)
|
|||
for(i = 0; sighandlers[i].signal; i++) {
|
||||
act.sa_handler = sighandlers[i].handler;
|
||||
if(sigaction(sighandlers[i].signal, &act, NULL) < 0)
|
||||
fprintf(stderr,
|
||||
_
|
||||
("Installing signal handler for signal %d (%s) failed: %s\n"),
|
||||
fprintf(stderr, _("Installing signal handler for signal %d (%s) failed: %s\n"),
|
||||
sighandlers[i].signal, strsignal(sighandlers[i].signal),
|
||||
strerror(errno));
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: protocol_edge.c,v 1.1.4.13 2002/09/09 22:33:02 guus Exp $
|
||||
$Id: protocol_edge.c,v 1.1.4.14 2002/09/15 14:55:53 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -220,9 +220,7 @@ int del_edge_h(connection_t *c)
|
|||
|
||||
if(!from) {
|
||||
if(debug_lvl >= DEBUG_PROTOCOL)
|
||||
syslog(LOG_ERR,
|
||||
_
|
||||
("Got %s from %s (%s) which does not appear in the edge tree"),
|
||||
syslog(LOG_ERR, _("Got %s from %s (%s) which does not appear in the edge tree"),
|
||||
"DEL_EDGE", c->name, c->hostname);
|
||||
return 0;
|
||||
}
|
||||
|
@ -231,9 +229,7 @@ int del_edge_h(connection_t *c)
|
|||
|
||||
if(!to) {
|
||||
if(debug_lvl >= DEBUG_PROTOCOL)
|
||||
syslog(LOG_ERR,
|
||||
_
|
||||
("Got %s from %s (%s) which does not appear in the edge tree"),
|
||||
syslog(LOG_ERR, _("Got %s from %s (%s) which does not appear in the edge tree"),
|
||||
"DEL_EDGE", c->name, c->hostname);
|
||||
return 0;
|
||||
}
|
||||
|
@ -244,9 +240,7 @@ int del_edge_h(connection_t *c)
|
|||
|
||||
if(!e) {
|
||||
if(debug_lvl >= DEBUG_PROTOCOL)
|
||||
syslog(LOG_WARNING,
|
||||
_
|
||||
("Got %s from %s (%s) which does not appear in the edge tree"),
|
||||
syslog(LOG_WARNING, _("Got %s from %s (%s) which does not appear in the edge tree"),
|
||||
"DEL_EDGE", c->name, c->hostname);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: subnet.c,v 1.1.2.42 2002/09/09 22:33:21 guus Exp $
|
||||
$Id: subnet.c,v 1.1.2.43 2002/09/15 14:55:54 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -111,9 +111,7 @@ int subnet_compare(subnet_t *a, subnet_t *b)
|
|||
case SUBNET_IPV6:
|
||||
return subnet_compare_ipv6(a, b);
|
||||
default:
|
||||
syslog(LOG_ERR,
|
||||
_
|
||||
("subnet_compare() was called with unknown subnet type %d, exitting!"),
|
||||
syslog(LOG_ERR, _("subnet_compare() was called with unknown subnet type %d, exitting!"),
|
||||
a->type);
|
||||
cp_trace();
|
||||
exit(0);
|
||||
|
|
13
src/tincd.c
13
src/tincd.c
|
@ -17,7 +17,7 @@
|
|||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
|
||||
$Id: tincd.c,v 1.10.4.64 2002/09/15 12:26:04 guus Exp $
|
||||
$Id: tincd.c,v 1.10.4.65 2002/09/15 14:55:54 guus Exp $
|
||||
*/
|
||||
|
||||
#include "config.h"
|
||||
|
@ -110,8 +110,7 @@ static void usage(int status)
|
|||
program_name);
|
||||
else {
|
||||
printf(_("Usage: %s [option]...\n\n"), program_name);
|
||||
printf(_
|
||||
(" -c, --config=DIR Read configuration options from DIR.\n"
|
||||
printf(_(" -c, --config=DIR Read configuration options from DIR.\n"
|
||||
" -D, --no-detach Don't fork and detach.\n"
|
||||
" -d, --debug[=LEVEL] Increase debug level or set it to LEVEL.\n"
|
||||
" -k, --kill[=SIGNAL] Attempt to kill a running tincd and exit.\n"
|
||||
|
@ -178,9 +177,7 @@ void parse_options(int argc, char **argv, char **envp)
|
|||
kill_tincd = atoi(optarg);
|
||||
|
||||
if(!kill_tincd) {
|
||||
fprintf(stderr,
|
||||
_
|
||||
("Invalid argument `%s'; SIGNAL must be a number or one of HUP, TERM, KILL, USR1, USR2, WINCH, INT or ALRM.\n"),
|
||||
fprintf(stderr, _("Invalid argument `%s'; SIGNAL must be a number or one of HUP, TERM, KILL, USR1, USR2, WINCH, INT or ALRM.\n"),
|
||||
optarg);
|
||||
usage(1);
|
||||
}
|
||||
|
@ -199,9 +196,7 @@ void parse_options(int argc, char **argv, char **envp)
|
|||
generate_keys = atoi(optarg);
|
||||
|
||||
if(generate_keys < 512) {
|
||||
fprintf(stderr,
|
||||
_
|
||||
("Invalid argument `%s'; BITS must be a number equal to or greater than 512.\n"),
|
||||
fprintf(stderr, _("Invalid argument `%s'; BITS must be a number equal to or greater than 512.\n"),
|
||||
optarg);
|
||||
usage(1);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue