]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Fix GCC 4.9 build after rev.14893
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 28 Oct 2016 08:41:57 +0000 (21:41 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 28 Oct 2016 08:41:57 +0000 (21:41 +1300)
GCC 4.9 does not support some corner cases of C++11 syntax. In this case
when it is presented with default nulptr initialization of function
pointers it gets confused with 'pure virtual' initialization:

    error: invalid pure specifier (only '= 0' is allowed) before ';' token

src/DiskIO/DiskThreads/DiskThreads.h

index 1a05e9478b76281414a44148597c7b73e130ca6e..e399cddea03dbfdba09404bca81eeffb13cd522a 100644 (file)
@@ -70,15 +70,17 @@ class squidaio_ctrl_t
 {
     MEMPROXY_CLASS(squidaio_ctrl_t);
 public:
+    squidaio_ctrl_t() : done_handler(NULL), free_func(NULL) {}
+
     squidaio_ctrl_t *next = nullptr;
     int fd = 0;
     int operation = 0;
-    AIOCB *done_handler = nullptr;
+    AIOCB *done_handler;
     void *done_handler_data = nullptr;
     squidaio_result_t result;
     int len = 0;
     char *bufp = nullptr;
-    FREE *free_func = nullptr;
+    FREE *free_func;
     dlink_node node;
 };