diff options
author | Christian Grothoff <christian@grothoff.org> | 2013-11-30 00:02:26 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2013-11-30 00:02:26 +0000 |
commit | b2f1bcafa32963ef1bbb9c00ea7b75c933c2016e (patch) | |
tree | 213cf86c269c6f61cfae3cb8e350d5ee1eb7f136 /src/nat | |
parent | d3ab6b114ef933c3810919f8bdb9f8c3ceb13774 (diff) | |
download | gnunet-b2f1bcafa32963ef1bbb9c00ea7b75c933c2016e.tar.gz gnunet-b2f1bcafa32963ef1bbb9c00ea7b75c933c2016e.zip |
applying patch from #3148 (by shedatc) to make gnunet-helper-nat-client compile on FreeBSD
Diffstat (limited to 'src/nat')
-rw-r--r-- | src/nat/Makefile.am | 10 | ||||
-rw-r--r-- | src/nat/gnunet-helper-nat-client.c | 5 | ||||
-rw-r--r-- | src/nat/gnunet-helper-nat-server.c | 5 |
3 files changed, 19 insertions, 1 deletions
diff --git a/src/nat/Makefile.am b/src/nat/Makefile.am index 6690026d2..e5630519c 100644 --- a/src/nat/Makefile.am +++ b/src/nat/Makefile.am | |||
@@ -21,6 +21,14 @@ if LINUX | |||
21 | install-exec-hook: | 21 | install-exec-hook: |
22 | $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true | 22 | $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true |
23 | else | 23 | else |
24 | if XFREEBSD | ||
25 | NATBIN = gnunet-helper-nat-server gnunet-helper-nat-client | ||
26 | NATSERVER = gnunet-helper-nat-server.c | ||
27 | NATCLIENT = gnunet-helper-nat-client.c | ||
28 | install-exec-hook: | ||
29 | $(top_srcdir)/src/nat/install-nat-helper.sh $(libexecdir) $(SUDO_BINARY) || true | ||
30 | endif | ||
31 | else | ||
24 | install-exec-hook: | 32 | install-exec-hook: |
25 | endif | 33 | endif |
26 | 34 | ||
@@ -97,4 +105,4 @@ test_nat_test_LDADD = \ | |||
97 | 105 | ||
98 | EXTRA_DIST = \ | 106 | EXTRA_DIST = \ |
99 | test_nat_data.conf \ | 107 | test_nat_data.conf \ |
100 | test_nat_test_data.conf \ No newline at end of file | 108 | test_nat_test_data.conf |
diff --git a/src/nat/gnunet-helper-nat-client.c b/src/nat/gnunet-helper-nat-client.c index bb31570b5..46d51a38c 100644 --- a/src/nat/gnunet-helper-nat-client.c +++ b/src/nat/gnunet-helper-nat-client.c | |||
@@ -61,6 +61,11 @@ | |||
61 | #include <netinet/ip_icmp.h> | 61 | #include <netinet/ip_icmp.h> |
62 | #include <netinet/in.h> | 62 | #include <netinet/in.h> |
63 | 63 | ||
64 | /* The following constant is missing from FreeBSD 9.2 */ | ||
65 | #ifndef ICMP_TIME_EXCEEDED | ||
66 | #define ICMP_TIME_EXCEEDED 11 | ||
67 | #endif | ||
68 | |||
64 | /** | 69 | /** |
65 | * Must match IP given in the server. | 70 | * Must match IP given in the server. |
66 | */ | 71 | */ |
diff --git a/src/nat/gnunet-helper-nat-server.c b/src/nat/gnunet-helper-nat-server.c index 37b875ee4..71057beec 100644 --- a/src/nat/gnunet-helper-nat-server.c +++ b/src/nat/gnunet-helper-nat-server.c | |||
@@ -65,6 +65,11 @@ | |||
65 | #include <netinet/ip_icmp.h> | 65 | #include <netinet/ip_icmp.h> |
66 | #include <netinet/in.h> | 66 | #include <netinet/in.h> |
67 | 67 | ||
68 | /* The following constant is missing from FreeBSD 9.2 */ | ||
69 | #ifndef ICMP_TIME_EXCEEDED | ||
70 | #define ICMP_TIME_EXCEEDED 11 | ||
71 | #endif | ||
72 | |||
68 | /** | 73 | /** |
69 | * Should we print some debug output? | 74 | * Should we print some debug output? |
70 | */ | 75 | */ |