Porting to FreeBSD:
- Reorganized and added some #includes
This commit is contained in:
parent
596e248bc5
commit
e118ba0a64
4 changed files with 14 additions and 11 deletions
|
|
@ -1,11 +1,11 @@
|
||||||
## Produce this file with automake to get Makefile.in
|
## Produce this file with automake to get Makefile.in
|
||||||
# $Id: Makefile.am,v 1.4.4.5 2000/11/02 21:26:51 zarq Exp $
|
# $Id: Makefile.am,v 1.4.4.6 2000/11/15 13:33:25 guus Exp $
|
||||||
|
|
||||||
sbin_PROGRAMS = tincd
|
sbin_PROGRAMS = tincd
|
||||||
|
|
||||||
tincd_SOURCES = conf.c connlist.c meta.c net.c netutl.c protocol.c subnet.c tincd.c
|
tincd_SOURCES = conf.c connlist.c meta.c net.c netutl.c protocol.c subnet.c tincd.c
|
||||||
|
|
||||||
INCLUDES = -I$(top_builddir) -I$(top_srcdir)/lib -I$(top_srcdir)/intl
|
INCLUDES = @INCLUDES@ -I$(top_builddir) -I$(top_srcdir)/lib -I$(top_srcdir)/intl
|
||||||
|
|
||||||
noinst_HEADERS = conf.h connlist.h meta.h net.h netutl.h protocol.h subnet.h
|
noinst_HEADERS = conf.h connlist.h meta.h net.h netutl.h protocol.h subnet.h
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: meta.c,v 1.1.2.10 2000/11/15 01:06:10 zarq Exp $
|
$Id: meta.c,v 1.1.2.11 2000/11/15 13:33:25 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
@ -26,9 +26,10 @@
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <sys/signal.h>
|
#include <sys/signal.h>
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
/* This line must be below the rest for FreeBSD */
|
||||||
|
#include <sys/socket.h>
|
||||||
|
|
||||||
#ifdef HAVE_OPENSSL_EVP_H
|
#ifdef HAVE_OPENSSL_EVP_H
|
||||||
# include <openssl/evp.h>
|
# include <openssl/evp.h>
|
||||||
|
|
|
||||||
13
src/net.c
13
src/net.c
|
|
@ -17,17 +17,13 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: net.c,v 1.35.4.72 2000/11/15 01:28:21 zarq Exp $
|
$Id: net.c,v 1.35.4.73 2000/11/15 13:33:26 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
||||||
#include <arpa/inet.h>
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
/* SunOS really wants sys/socket.h BEFORE net/if.h */
|
|
||||||
#include <sys/socket.h>
|
|
||||||
#include <net/if.h>
|
|
||||||
#include <netdb.h>
|
#include <netdb.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
@ -39,6 +35,11 @@
|
||||||
#include <syslog.h>
|
#include <syslog.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
/* SunOS really wants sys/socket.h BEFORE net/if.h,
|
||||||
|
and FreeBSD wants these lines below the rest. */
|
||||||
|
#include <arpa/inet.h>
|
||||||
|
#include <sys/socket.h>
|
||||||
|
#include <net/if.h>
|
||||||
|
|
||||||
#ifdef HAVE_OPENSSL_RAND_H
|
#ifdef HAVE_OPENSSL_RAND_H
|
||||||
# include <openssl/rand.h>
|
# include <openssl/rand.h>
|
||||||
|
|
@ -1097,7 +1098,7 @@ conn_list_t *create_new_connection(int sfd)
|
||||||
cp
|
cp
|
||||||
p = new_conn_list();
|
p = new_conn_list();
|
||||||
|
|
||||||
if(getpeername(sfd, &ci, &len) < 0)
|
if(getpeername(sfd, (struct sockaddr *) &ci, (socklen_t *) &len) < 0)
|
||||||
{
|
{
|
||||||
syslog(LOG_ERR, _("System call `%s' failed: %m"),
|
syslog(LOG_ERR, _("System call `%s' failed: %m"),
|
||||||
"getpeername");
|
"getpeername");
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
along with this program; if not, write to the Free Software
|
along with this program; if not, write to the Free Software
|
||||||
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
|
||||||
$Id: protocol.c,v 1.28.4.60 2000/11/15 01:06:11 zarq Exp $
|
$Id: protocol.c,v 1.28.4.61 2000/11/15 13:33:27 guus Exp $
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
#include "config.h"
|
||||||
|
|
@ -30,6 +30,7 @@
|
||||||
#include <sys/socket.h>
|
#include <sys/socket.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include <utils.h>
|
#include <utils.h>
|
||||||
#include <xalloc.h>
|
#include <xalloc.h>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue