summaryrefslogtreecommitdiff
path: root/irc/tircproxy/files/patch-ad
blob: f37ddbba3403832b4fe276b8704fcf96d3b550cb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
*** tircproxy.c.orig	Thu May  4 22:53:30 2000
--- tircproxy.c	Wed Aug 22 13:42:46 2001
***************
*** 1065,1074 ****
  {
  	struct sockaddr_in			to_addr;
  	int					to_len;
  #if IPF
! 	struct sockaddr_in			socketin, sloc;
! 	natlookup_t     			natlook;
! 	int					fd;
  #endif
     
     	/* Give this thing 10 minutes to get started (paranoia).
--- 1065,1084 ----
  {
  	struct sockaddr_in			to_addr;
  	int					to_len;
+ 
  #if IPF
!         struct sockaddr_in                      socketin, sloc;
!         natlookup_t                             natlook;
!  
! #if __FreeBSD__ >= 2
! #include <osreldate.h>
!  #if __FreeBSD_version >= 430000
! 
!         natlookup_t                             *natlookp = &natlook;
! 
!  #endif
! #endif
!         int                                     fd;
  #endif
     
     	/* Give this thing 10 minutes to get started (paranoia).
***************
*** 1152,1158 ****
                  natlook.nl_inport = sloc.sin_port;
  
                  fd = open(IPL_NAT, O_RDONLY);
!                 if (ioctl(fd, SIOCGNATL, &natlook) == -1)
  	     	{
                  	perror("ioctl");
                  	exit(-1);
--- 1162,1175 ----
                  natlook.nl_inport = sloc.sin_port;
  
                  fd = open(IPL_NAT, O_RDONLY);
! #if __FreeBSD__ >= 2
! #include <osreldate.h>
!  #if __FreeBSD_version >= 430000
!                  if (ioctl(fd, SIOCGNATL, &natlookp) == -1)
!  #else
!                  if (ioctl(fd, SIOCGNATL, &natlook) == -1)
!  #endif
! #endif               
  	     	{
                  	perror("ioctl");
                  	exit(-1);