MFH: r522054

net-p2p/namecoin: fix build on GCC architectures

It looks like some update caused src/httpserver.c to need to include deque when building with GCC. Otherwise it fails to compile with:
httpserver.cpp:74:10: error: 'deque' in namespace 'std' does not name a template type
   74 |     std::deque<std::unique_ptr<WorkItem>> queue;
      |          ^~~~~
httpserver.cpp:33:1: note: 'std::deque' is defined in header '<deque>'; did you forget to '#include <deque>'?
   32 | #include <support/events.h>
  +++ |+#include <deque>
   33 |
httpserver.cpp: In member function 'bool WorkQueue<WorkItem>::Enqueue(WorkItem*)':
httpserver.cpp:92:13: error: 'queue' was not declared in this scope; did you mean 'Enqueue'?
   92 |         if (queue.size() >= maxDepth) {
      |             ^~~~~
      |             Enqueue
httpserver.cpp:95:9: error: 'queue' was not declared in this scope; did you mean 'Enqueue'?
   95 |         queue.emplace_back(std::unique_ptr<WorkItem>(item));
      |         ^~~~~
      |         Enqueue
httpserver.cpp: In member function 'void WorkQueue<WorkItem>::Run()':
httpserver.cpp:106:35: error: 'queue' was not declared in this scope; did you mean 'Enqueue'?
  106 |                 while (running && queue.empty())
      |                                   ^~~~~
      |                                   Enqueue
httpserver.cpp:110:31: error: 'queue' was not declared in this scope; did you mean 'Enqueue'?
  110 |                 i = std::move(queue.front());
      |                               ^~~~~
      |                               Enqueue

PR:             242710
Approved by:    milios@ccsys.com (maintainer timeout)
Approved by:	portmgr (fix build blanket)
This commit is contained in:
Piotr Kubaj 2020-01-04 20:20:49 +00:00
parent a32a6ea187
commit 19ebbd20bb
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/branches/2020Q1/; revision=522055

View File

@ -0,0 +1,10 @@
--- src/httpserver.cpp.orig 2019-12-18 12:22:29 UTC
+++ src/httpserver.cpp
@@ -30,6 +30,7 @@
#include <event2/keyvalq_struct.h>
#include <support/events.h>
+#include <deque>
#ifdef EVENT__HAVE_NETINET_IN_H
#include <netinet/in.h>