[128545] trunk/dports/net/bro
ryandesign at macports.org
ryandesign at macports.org
Sat Nov 22 16:13:06 PST 2014
Revision: 128545
https://trac.macports.org/changeset/128545
Author: ryandesign at macports.org
Date: 2014-11-22 16:13:06 -0800 (Sat, 22 Nov 2014)
Log Message:
-----------
bro: fix build on Yosemite which already defines htonll and ntohll (#45990)
Modified Paths:
--------------
trunk/dports/net/bro/Portfile
Added Paths:
-----------
trunk/dports/net/bro/files/patch-htonll.diff
Modified: trunk/dports/net/bro/Portfile
===================================================================
--- trunk/dports/net/bro/Portfile 2014-11-23 00:03:38 UTC (rev 128544)
+++ trunk/dports/net/bro/Portfile 2014-11-23 00:13:06 UTC (rev 128545)
@@ -39,6 +39,7 @@
port:zlib
patchfiles patch-CMakeLists.txt.diff
+patchfiles-append patch-htonll.diff
universal_variant no
Added: trunk/dports/net/bro/files/patch-htonll.diff
===================================================================
--- trunk/dports/net/bro/files/patch-htonll.diff (rev 0)
+++ trunk/dports/net/bro/files/patch-htonll.diff 2014-11-23 00:13:06 UTC (rev 128545)
@@ -0,0 +1,56 @@
+Fix build on Yosemite which already defines htonll and ntohll
+https://bro-tracker.atlassian.net/browse/BIT-1234
+https://github.com/bro/bro/commit/121fcdbb5b922103e28e806896e2cd3e15803478
+--- CMakeLists.txt.orig
++++ CMakeLists.txt
+@@ -148,6 +148,8 @@ set(brodeps
+
+ include(TestBigEndian)
+ test_big_endian(WORDS_BIGENDIAN)
++include(CheckSymbolExists)
++check_symbol_exists(htonll arpa/inet.h HAVE_BYTEORDER_64)
+
+ include(OSSpecific)
+ include(CheckTypes)
+--- config.h.in.orig
++++ config.h.in
+@@ -129,6 +129,9 @@
+ /* whether words are stored with the most significant byte first */
+ #cmakedefine WORDS_BIGENDIAN
+
++/* whether htonll/ntohll is defined in <arpa/inet.h> */
++#cmakedefine HAVE_BYTEORDER_64
++
+ /* ultrix can't hack const */
+ #cmakedefine NEED_ULTRIX_CONST_HACK
+ #ifdef NEED_ULTRIX_CONST_HACK
+--- src/net_util.h.orig
++++ src/net_util.h
+@@ -180,8 +180,11 @@ extern uint32 extract_uint32(const u_char* data);
+
+ inline double ntohd(double d) { return d; }
+ inline double htond(double d) { return d; }
++
++#ifndef HAVE_BYTEORDER_64
+ inline uint64 ntohll(uint64 i) { return i; }
+ inline uint64 htonll(uint64 i) { return i; }
++#endif
+
+ #else
+
+@@ -207,6 +210,7 @@ inline double ntohd(double d)
+
+ inline double htond(double d) { return ntohd(d); }
+
++#ifndef HAVE_BYTEORDER_64
+ inline uint64 ntohll(uint64 i)
+ {
+ u_char c;
+@@ -224,6 +228,7 @@ inline uint64 ntohll(uint64 i)
+ }
+
+ inline uint64 htonll(uint64 i) { return ntohll(i); }
++#endif
+
+ #endif
+
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/macports-changes/attachments/20141122/4a0f6410/attachment.html>
More information about the macports-changes
mailing list