summaryrefslogtreecommitdiff
path: root/audio
diff options
context:
space:
mode:
authorjoerg <joerg>2013-05-06 14:17:27 +0000
committerjoerg <joerg>2013-05-06 14:17:27 +0000
commit0ad6077f950406acaedc20297dfe872219d621bc (patch)
tree0bc3ea522b53be89704609676cab7ff2912c7655 /audio
parent6ebf95ec2585008286a5d684a260556eff4e51eb (diff)
downloadpkgsrc-0ad6077f950406acaedc20297dfe872219d621bc.tar.gz
Add missing include. Don't define hash<string> manually, it exists in
<functional> since GCC 4.1.
Diffstat (limited to 'audio')
-rw-r--r--audio/daapd/distinfo3
-rw-r--r--audio/daapd/patches/patch-types.h55
2 files changed, 57 insertions, 1 deletions
diff --git a/audio/daapd/distinfo b/audio/daapd/distinfo
index 897278628cf..8b240101dad 100644
--- a/audio/daapd/distinfo
+++ b/audio/daapd/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.22 2012/02/15 21:20:24 hans Exp $
+$NetBSD: distinfo,v 1.23 2013/05/06 14:17:27 joerg Exp $
SHA1 (daapd-0.2.4b.tgz) = 0903303f155c19ae12cdc78be05799508156a16b
RMD160 (daapd-0.2.4b.tgz) = 899b37b3872623ef918f7faa4eb8bad2dfc5b369
@@ -11,4 +11,5 @@ SHA1 (patch-af) = 1a453dde4dd7d33061a500729b9ef5d89e850133
SHA1 (patch-ag) = cf0dc389fb2a031883f52c348d8303dd36b33818
SHA1 (patch-daapd.cc) = 9107fc35ca6eb8a9841f986342781769bc29a9d2
SHA1 (patch-libhttpd_configure) = 91a7a942a078bda76582cbdf0cc1d3ae8b7029cb
+SHA1 (patch-types.h) = 9ed8df565509947dbd471b26aa210d8b3ae58385
SHA1 (patch-util.cc) = 18f0158016f56d9253459b2efe6ed528bac750c0
diff --git a/audio/daapd/patches/patch-types.h b/audio/daapd/patches/patch-types.h
new file mode 100644
index 00000000000..2ba408b821f
--- /dev/null
+++ b/audio/daapd/patches/patch-types.h
@@ -0,0 +1,55 @@
+$NetBSD: patch-types.h,v 1.1 2013/05/06 14:17:28 joerg Exp $
+
+--- types.h.orig 2013-05-04 14:53:09.000000000 +0000
++++ types.h
+@@ -32,6 +32,7 @@
+ #include <sys/stat.h>
+ #include <strings.h>
+ #include <pthread.h>
++#include <cstdlib>
+
+ // #include "mmgr.h"
+
+@@ -40,41 +41,7 @@
+
+ #include "dboutput.h"
+ #include "songcache.h"
+-
+-
+-// STL defines no hash function for std::string.
+-// How annoying.
+-
+-#ifdef __GNUC__
+-// gcc version < 3.1.0 ?
+-#if __GNUC__ < 3 || \
+-(__GNUC__ == 3 && __GNUC_MINOR__ < 1)
+- __STL_BEGIN_NAMESPACE
+- template<> struct hash<std::string> {
+- size_t operator()(std::string __s) const {
+- return __stl_hash_string( (const char*) __s.c_str() );
+- }
+- };
+- __STL_END_NAMESPACE
+-#else
+- namespace __gnu_cxx {
+- template<> struct hash<std::string> {
+- size_t operator()(std::string __s) const {
+- return __stl_hash_string( (const char*) __s.c_str() );
+- }
+- };
+- }
+-#endif // GCC_VERSION
+-#else
+- __STL_BEGIN_NAMESPACE
+- template<> struct hash<std::string> {
+- size_t operator()(std::string __s) const {
+- return __stl_hash_string( (const char*) __s.c_str() );
+- }
+- };
+- __STL_END_NAMESPACE
+-#endif // __GNUC__
+-
++#include <string>
+
+ // database/server init parameters
+ struct InitParams {