Lines 1-64
Link Here
|
1 |
- DSCP cannot be modified on FreeBSD yet |
|
|
2 |
src/tcp.c:61:14: error: use of undeclared identifier 'IPTOS_DSCP_MASK' |
3 |
v = dscp & IPTOS_DSCP_MASK; |
4 |
|
5 |
- Change include order for FreeBSD |
6 |
In file included from src/tcp.c:33: |
7 |
/usr/include/netinet/ip.h:69:17: error: field has incomplete type 'struct in_addr' |
8 |
struct in_addr ip_src,ip_dst; /* source and dest address */ |
9 |
^ |
10 |
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr' |
11 |
struct in_addr ip_src,ip_dst; /* source and dest address */ |
12 |
^ |
13 |
/usr/include/netinet/ip.h:69:24: error: field has incomplete type 'struct in_addr' |
14 |
struct in_addr ip_src,ip_dst; /* source and dest address */ |
15 |
^ |
16 |
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr' |
17 |
struct in_addr ip_src,ip_dst; /* source and dest address */ |
18 |
^ |
19 |
/usr/include/netinet/ip.h:181:19: error: field has incomplete type 'struct in_addr' |
20 |
struct in_addr ipt_addr; |
21 |
^ |
22 |
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr' |
23 |
struct in_addr ip_src,ip_dst; /* source and dest address */ |
24 |
^ |
25 |
/usr/include/netinet/ip.h:216:17: error: field has incomplete type 'struct in_addr' |
26 |
struct in_addr ippseudo_src; /* source internet address */ |
27 |
^ |
28 |
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr' |
29 |
struct in_addr ip_src,ip_dst; /* source and dest address */ |
30 |
^ |
31 |
/usr/include/netinet/ip.h:217:17: error: field has incomplete type 'struct in_addr' |
32 |
struct in_addr ippseudo_dst; /* destination internet address */ |
33 |
^ |
34 |
/usr/include/netinet/ip.h:69:9: note: forward declaration of 'struct in_addr' |
35 |
struct in_addr ip_src,ip_dst; /* source and dest address */ |
36 |
^ |
37 |
--- src/tcp.c.orig 2017-01-20 19:41:51.000000000 +0100 |
38 |
+++ src/tcp.c 2017-02-08 11:15:26.836727000 +0100 |
39 |
@@ -30,8 +30,8 @@ |
40 |
#include <fcntl.h> |
41 |
#include <errno.h> |
42 |
#include <signal.h> |
43 |
-#include <netinet/ip.h> |
44 |
#include <netinet/in.h> |
45 |
+#include <netinet/ip.h> |
46 |
#include <netinet/tcp.h> |
47 |
#include <arpa/inet.h> |
48 |
|
49 |
@@ -56,6 +56,7 @@ |
50 |
int |
51 |
socket_set_dscp(int sockfd, uint32_t dscp, char *errbuf, size_t errbufsize) |
52 |
{ |
53 |
+#ifdef IPTOS_DSCP_MASK |
54 |
int r, v; |
55 |
|
56 |
v = dscp & IPTOS_DSCP_MASK; |
57 |
@@ -65,6 +66,7 @@ |
58 |
snprintf(errbuf, errbufsize, "IP_TOS failed: %s", strerror(errno)); |
59 |
return -1; |
60 |
} |
61 |
+#endif |
62 |
return 0; |
63 |
} |
64 |
|