diff options
author | joerg <joerg@pkgsrc.org> | 2015-03-10 14:08:01 +0000 |
---|---|---|
committer | joerg <joerg@pkgsrc.org> | 2015-03-10 14:08:01 +0000 |
commit | 69971df88a59e4d31b7050db5a10e752c8ede517 (patch) | |
tree | 7381aad5c38ee3fe71da27a5f76c211473b14cd0 /net | |
parent | 138ffccf38d35f570e2d8857702482818a0f8377 (diff) | |
download | pkgsrc-69971df88a59e4d31b7050db5a10e752c8ede517.tar.gz |
Fix build on NetBSD/ARM.
Diffstat (limited to 'net')
-rw-r--r-- | net/grive/distinfo | 4 | ||||
-rw-r--r-- | net/grive/patches/patch-libgrive_src_protocol_Json.cc | 45 |
2 files changed, 46 insertions, 3 deletions
diff --git a/net/grive/distinfo b/net/grive/distinfo index dbefec89a3e..28f4eede7ad 100644 --- a/net/grive/distinfo +++ b/net/grive/distinfo @@ -1,8 +1,8 @@ -$NetBSD: distinfo,v 1.1.1.1 2014/06/06 14:57:00 abs Exp $ +$NetBSD: distinfo,v 1.2 2015/03/10 14:08:01 joerg Exp $ SHA1 (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = e3059b0ce32ea05d7b5457948317b39358dbb239 RMD160 (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = f2a8c3e67f24c01b45ba831f2b3b8c2b5e39fe5c Size (grive-20130502-27817e835fe115ebbda5410ec904aa49a2ad01f1.tar.gz) = 162471 bytes SHA1 (patch-cmake_Modules_FindJSONC.cmake) = 3038261ef82ad501ffeae18abbba562cc73ae435 -SHA1 (patch-libgrive_src_protocol_Json.cc) = 81087f290cba4f37aeac09742973a78fd9be0bb9 +SHA1 (patch-libgrive_src_protocol_Json.cc) = c6a30dd3558a1e054e0486531cc6142e9ad0d263 SHA1 (patch-libgrive_src_util_OS.cc) = 79cdfe8f89e28901b44c1e8dc5f054a9ca03f061 diff --git a/net/grive/patches/patch-libgrive_src_protocol_Json.cc b/net/grive/patches/patch-libgrive_src_protocol_Json.cc index f856514842e..037adb80eac 100644 --- a/net/grive/patches/patch-libgrive_src_protocol_Json.cc +++ b/net/grive/patches/patch-libgrive_src_protocol_Json.cc @@ -1,6 +1,7 @@ -$NetBSD: patch-libgrive_src_protocol_Json.cc,v 1.1.1.1 2014/06/06 14:57:00 abs Exp $ +$NetBSD: patch-libgrive_src_protocol_Json.cc,v 1.2 2015/03/10 14:08:02 joerg Exp $ Update for json-c 0.11 and later +On NetBSD/ARM, int32_t is not long, so add template specialisation for that. --- libgrive/src/protocol/Json.cc.orig 2013-05-02 16:40:04.000000000 +0000 +++ libgrive/src/protocol/Json.cc @@ -15,3 +16,45 @@ Update for json-c 0.11 and later #ifdef _MSC_VER #pragma warning(pop) #endif +@@ -107,6 +107,20 @@ Json::Json( const boost::int32_t& l ) : + ) ; + } + ++#ifdef __arm__ ++template <> ++Json::Json( const long& l ) : ++ m_json( ::json_object_new_int( l ) ) ++{ ++ if ( m_json == 0 ) ++ BOOST_THROW_EXCEPTION( ++ Error() ++ << JsonCApi_( "json_object_new_int" ) ++ << ValueErr( l ) ++ ) ; ++} ++#endif ++ + template <> + Json::Json( const boost::int64_t& l ) : + m_json( ::json_object_new_int64( l ) ) +@@ -131,6 +145,20 @@ Json::Json( const boost::uint32_t& l ) : + ) ; + } + ++#ifdef __arm__ ++template <> ++Json::Json( const unsigned long& l ) : ++ m_json( ::json_object_new_int( static_cast<int>(l) ) ) ++{ ++ if ( m_json == 0 ) ++ BOOST_THROW_EXCEPTION( ++ Error() ++ << JsonCApi_( "json_object_new_int" ) ++ << ValueErr( l ) ++ ) ; ++} ++#endif ++ + template <> + Json::Json( const boost::uint64_t& l ) : + m_json( ::json_object_new_int64( l ) ) |