File: 300-freebsd.patch

package info (click to toggle)
mgen 5.02.c%2Breally5.1.1%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 6,468 kB
  • sloc: cpp: 78,523; ansic: 4,169; python: 1,334; sh: 30; makefile: 18
file content (40 lines) | stat: -rw-r--r-- 1,227 bytes parent folder | download | duplicates (3)
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
Author: Nicholas Bamber <nicholas@periapt.co.uk>
Description: attempt to port to Debian/kFreeBSD
 This patch attempts to get the package building on
 FreeBSD. So far it adds in '#include'
 statements that appear to be missing. However this
 comes unstuck when we hit the RTF_WASCLONED symbol.
 This would be defined in net/route.h but seems to
 have been removed. It would be nice if upstream
 or someone with more knowledge of FreeBSD networking
 would have a look at this. However for the moment
 the patch adds this #define back in. This gets it
 to compile but is highly suspicious.
Last-Update: 2012-02-10
Forwarded: yes, sent private email to upstream authors
--- a/protolib/include/protoFile.h
+++ b/protolib/include/protoFile.h
@@ -21,6 +21,10 @@
 #include <sys/stat.h>
 #endif // if/else _WIN32_WCE
 
+#ifndef _SYS_FILE_H
+#include <sys/file.h>
+#endif
+
 #include <ctype.h> // for "isprint()"
 // required protolib files
 #include "protoChannel.h"
--- a/protolib/src/bsd/bsdRouteMgr.cpp
+++ b/protolib/src/bsd/bsdRouteMgr.cpp
@@ -15,6 +15,10 @@
 #include <net/route.h>
 #include <net/if_dl.h>
 
+#ifndef RTF_WASCLONED
+#define RTF_WASCLONED 0x20000
+#endif
+
 class BsdRouteMgr : public ProtoRouteMgr
 {
     public: