~ubuntu-branches/ubuntu/vivid/vowpal-wabbit/vivid

« back to all changes in this revision

Viewing changes to debian/patches/fix-ftbfs-with-gcc-4.7

  • Committer: Package Import Robot
  • Author(s): Yaroslav Halchenko
  • Date: 2013-08-27 20:52:23 UTC
  • mfrom: (1.2.1) (7.1.2 experimental)
  • Revision ID: package-import@ubuntu.com-20130827205223-q005ps71tqinh25v
Tags: 7.3-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
Description: Fix FTBFS with gcc 4.7 by fixing a bunch of missing includes.
2
 
Author: Cyril Brulebois <kibi@debian.org>
3
 
Bug-Debian: http://bugs.debian.org/667412
4
 
 
5
 
--- a/v_array.h
6
 
+++ b/v_array.h
7
 
@@ -7,6 +7,8 @@ embodied in the content of this file are
8
 
 #ifndef VARRAY_H__
9
 
 #define VARRAY_H__
10
 
 #include <stdlib.h>
11
 
+#include <cstring>
12
 
+#include <algorithm>
13
 
 
14
 
 template<class T> class v_array{
15
 
  public:
16
 
@@ -47,7 +49,7 @@ template<class T> void push_many(v_array
17
 
   if(v.end+num >= v.end_array)
18
 
     {
19
 
       size_t length = v.end - v.begin;
20
 
-      size_t new_length = max(2 * (size_t)(v.end_array - v.begin) + 3, 
21
 
+      size_t new_length = std::max(2 * (size_t)(v.end_array - v.begin) + 3, 
22
 
                              v.end - v.begin + num);
23
 
       v.begin = (T *)realloc(v.begin,sizeof(T) * new_length);
24
 
       v.end = v.begin + length;
25
 
--- a/active_interactor.cc
26
 
+++ b/active_interactor.cc
27
 
@@ -6,6 +6,7 @@
28
 
 #include <netinet/in.h>
29
 
 #include <netinet/tcp.h>
30
 
 #include <netdb.h>
31
 
+#include <unistd.h>
32
 
 
33
 
 using std::cin;
34
 
 using std::endl;
35
 
--- a/allreduce.cc
36
 
+++ b/allreduce.cc
37
 
@@ -21,6 +21,7 @@ Alekh Agarwal and John Langford, with he
38
 
 #include <string.h>
39
 
 #include <stdlib.h>
40
 
 #include <sys/timeb.h>
41
 
+#include <unistd.h>
42
 
 #include "allreduce.h"
43
 
 
44
 
 using namespace std;
45
 
--- a/io.h
46
 
+++ b/io.h
47
 
@@ -8,6 +8,7 @@ embodied in the content of this file are
48
 
 #define IO_H__
49
 
 
50
 
 #include <fcntl.h>
51
 
+#include <unistd.h>
52
 
 #include "v_array.h"
53
 
 #include<iostream>
54
 
 
55
 
--- a/network.cc
56
 
+++ b/network.cc
57
 
@@ -13,6 +13,7 @@
58
 
 
59
 
 #include <string>
60
 
 #include <iostream>
61
 
+#include <unistd.h>
62
 
 
63
 
 using namespace std;
64