diff options
author | Hiroki Sato <hrs@FreeBSD.org> | 2015-09-11 22:51:10 +0000 |
---|---|---|
committer | Hiroki Sato <hrs@FreeBSD.org> | 2015-09-11 22:51:10 +0000 |
commit | 7bd9a97baf741709efb7bef8192267cfa74e3cf3 (patch) | |
tree | 5049107ef301b10ec0026492531a8dc9aad85066 | |
parent | multimedia/transcode: convert to target helpers (diff) |
Fix compile error on 9.x and 11.x.
Spotted by: amdmi3
PR: 203011
Notes
Notes:
svn path=/head/; revision=396720
-rw-r--r-- | net/xorp/Makefile | 3 | ||||
-rw-r--r-- | net/xorp/files/patch-SConstruct | 23 | ||||
-rw-r--r-- | net/xorp/files/patch-bgp__path_attribute.cc | 21 | ||||
-rw-r--r-- | net/xorp/files/patch-bgp__route_table_policy.cc | 11 | ||||
-rw-r--r-- | net/xorp/files/patch-libxipc-xrl_parser.cc | 72 | ||||
-rw-r--r-- | net/xorp/files/patch-libxorp-ref_trie.hh | 25 | ||||
-rw-r--r-- | net/xorp/files/patch-rip-port.cc | 19 |
7 files changed, 154 insertions, 20 deletions
diff --git a/net/xorp/Makefile b/net/xorp/Makefile index d8759f14ed2a..025663b049dd 100644 --- a/net/xorp/Makefile +++ b/net/xorp/Makefile @@ -53,9 +53,6 @@ TCP_RPC_MAKE_ARGS_OFF= transport=local post-patch: ${REINPLACE_CMD} 's,%%LOCALBASE%%,${LOCALBASE},' ${WRKSRC}/SConstruct -.if ${COMPILER_TYPE} == "clang" - ${REINPLACE_CMD} 's,-Werror,& -Wno-unused-function,' ${WRKSRC}/SConstruct -.endif post-install: ${INSTALL_DATA} ${WRKSRC}/rtrmgr/config/multicast4.boot \ diff --git a/net/xorp/files/patch-SConstruct b/net/xorp/files/patch-SConstruct index f64ab642719b..100b45bb6315 100644 --- a/net/xorp/files/patch-SConstruct +++ b/net/xorp/files/patch-SConstruct @@ -25,20 +25,11 @@ variables = vars) prefix = env['prefix'] -@@ -858,13 +849,13 @@ if ((build != "i386-pc-mingw32") and - host_cpu == "i386" or - host_cpu == "x86_64")): - env.AppendUnique(CFLAGS = [ -- '-Werror', -+ '-Werror -Wno-unused-function', - ]) - env.AppendUnique(CXXFLAGS = [ -- '-Werror', -+ '-Werror -Wno-unused-function', - ]) - else: -- print "WARNING: Detected funky platform, will not enable -Werror compile option: ", host_cpu -+ print "WARNING: Detected funky platform, will not enable -Werror -Wno-unused-function compile option: ", host_cpu - +@@ -880,6 +871,7 @@ env.AppendUnique(CFLAGS = [ + '-Wcast-align', + '-Wstrict-prototypes', + '-Wnested-externs', ++ '-Wno-unused-function', + '-pipe', + ]) - # NOTE: gcc specific flags. diff --git a/net/xorp/files/patch-bgp__path_attribute.cc b/net/xorp/files/patch-bgp__path_attribute.cc index a2582ff9b6a2..95b0a80ee285 100644 --- a/net/xorp/files/patch-bgp__path_attribute.cc +++ b/net/xorp/files/patch-bgp__path_attribute.cc @@ -1,6 +1,25 @@ --- bgp/path_attribute.cc.orig 2012-01-11 17:56:10 UTC +++ bgp/path_attribute.cc -@@ -830,8 +830,11 @@ PathAttribute * +@@ -45,18 +45,6 @@ + + template<class A> AttributeManager<A>* PAListRef<A>::_att_mgr = 0; + +-#ifdef DEBUG_LOGGING +-inline static void +-dump_bytes(const uint8_t* d, uint8_t l) +-{ +- for (uint16_t i = 0; i < l; i++) { +- debug_msg("%3u 0x%02x\n", i, d[i]); +- } +-} +-#else +-inline static void dump_bytes(const uint8_t*, uint8_t) {} +-#endif /* DEBUG_LOGGING */ +- + /* + * Flags values crib: + * +@@ -830,8 +818,11 @@ PathAttribute * ClusterListAttribute::clone() const { ClusterListAttribute *ca = new ClusterListAttribute(); diff --git a/net/xorp/files/patch-bgp__route_table_policy.cc b/net/xorp/files/patch-bgp__route_table_policy.cc new file mode 100644 index 000000000000..965af78a6f4f --- /dev/null +++ b/net/xorp/files/patch-bgp__route_table_policy.cc @@ -0,0 +1,11 @@ +--- bgp/route_table_policy.cc.orig 2015-09-12 04:01:52.945569000 +0900 ++++ bgp/route_table_policy.cc 2015-09-12 04:06:26.219083000 +0900 +@@ -69,7 +69,7 @@ + bool no_modify) const + { + if (!_enable_filtering) { +- return &rtmsg; ++ return true; + } + + _varrw->attach_route(rtmsg, no_modify); diff --git a/net/xorp/files/patch-libxipc-xrl_parser.cc b/net/xorp/files/patch-libxipc-xrl_parser.cc new file mode 100644 index 000000000000..fce125423222 --- /dev/null +++ b/net/xorp/files/patch-libxipc-xrl_parser.cc @@ -0,0 +1,72 @@ +--- libxipc/xrl_parser.cc.orig 2012-01-11 17:56:10 UTC ++++ libxipc/xrl_parser.cc +@@ -105,18 +105,6 @@ XrlParseError::pretty_print(const size_t + + _reason + string("\n") + snapshot + string("\n") + indicator; + } + +-// ---------------------------------------------------------------------------- +-// Utility routines for Xrl parsing +- +-static inline void +-advance_to_either(const string& input, string::const_iterator& sci, +- const char* choices) { +- while (sci != input.end()) { +- if (strchr(choices,*sci)) break; +- sci++; +- } +-} +- + static inline void + advance_to_char(const string& input, string::const_iterator& sci, char c) + { +@@ -132,16 +120,6 @@ isxrlplain(int c) + return (xorp_isalnum(c) || c == '_' || c == '-'); + } + +-static inline size_t +-skip_xrl_plain_chars(const string& input, string::const_iterator& sci) +-{ +- string::const_iterator start = sci; +- for ( ; sci != input.end() && isxrlplain(*sci); sci++) { +- // XXX: Empty body +- } +- return sci - start; +-} +- + static inline char + c_escape_to_char(const string& input, + string::const_iterator sci) { +@@ -238,12 +216,6 @@ skip_past_blanks(const string& s, string + } + + static inline void +-skip_one_char(const string&, string::const_iterator* sci) +-{ +- sci++; +-} +- +-static inline void + skip_cplusplus_comments(const string& s, string::const_iterator& sci) + { + assert(*sci == '/'); +@@ -367,20 +339,6 @@ get_unquoted_value(const string& input, + token = string(sci_start, sci); + } + +-static inline string::const_iterator +-uninterrupted_token_end(const string& input, +- string::const_iterator& sci) +-{ +- string::const_iterator end = sci; +- +- while (end != input.end() && +- ( !xorp_isspace(*end) && isascii(*end) && !xorp_iscntrl(*end) )) { +- end++; +- } +- +- return end; +-} +- + static inline void + get_protocol_target_and_command(const string& input, + string::const_iterator& sci, diff --git a/net/xorp/files/patch-libxorp-ref_trie.hh b/net/xorp/files/patch-libxorp-ref_trie.hh new file mode 100644 index 000000000000..1dd00e5312aa --- /dev/null +++ b/net/xorp/files/patch-libxorp-ref_trie.hh @@ -0,0 +1,25 @@ +--- libxorp/ref_trie.hh.orig 2015-09-12 03:45:51.752442000 +0900 ++++ libxorp/ref_trie.hh 2015-09-12 03:48:56.187304000 +0900 +@@ -1336,10 +1336,6 @@ + #ifdef DEBUG_LOGGING + debug_msg_indent(indent); + +- if (this == NULL) { +- debug_msg("%sNULL\n", msg); +- return; +- } + debug_msg("%skey: %s %s\n", + msg, _k.str().c_str(), _p ? "PL" : "[]"); + debug_msg(" U: %s\n", _up ? _up->_k.str().c_str() : "NULL"); +@@ -1356,10 +1352,7 @@ + RefTrieNode<A, Payload>::str() const + { + string s; +- if (this == NULL) { +- s = "NULL"; +- return s; +- } ++ + s = c_format("key: %s ", _k.str().c_str()); + if (_p) + s += "PL"; diff --git a/net/xorp/files/patch-rip-port.cc b/net/xorp/files/patch-rip-port.cc new file mode 100644 index 000000000000..8a60526a2947 --- /dev/null +++ b/net/xorp/files/patch-rip-port.cc @@ -0,0 +1,19 @@ +--- rip/port.cc.orig 2012-01-11 17:56:10 UTC ++++ rip/port.cc +@@ -44,16 +44,6 @@ + #include "output_updates.hh" + + // ---------------------------------------------------------------------------- +-// Utilities +- +-inline static uint32_t +-range_random(uint32_t lo, uint32_t hi) +-{ +- if (hi < lo) swap(hi, lo); +- return lo + ( xorp_random() % (hi - lo) ); +-} +- +-// ---------------------------------------------------------------------------- + // Address Family specific Port methods + + #ifdef INSTANTIATE_IPV4 |