aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/libzypp/libzypp/cstdio.patch
blob: a021d589d33570f21281f4e9ee1fe65c6e270b44 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
include cstdio to get definitions of ::xxx functions which
are now reported by gcc-4.7 as wanrings and warnings are treated
as errors

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Upstream-Status: Pending

Index: git/zypp/ExternalProgram.cc
===================================================================
--- git.orig/zypp/ExternalProgram.cc	2012-06-01 16:25:17.098304709 -0700
+++ git/zypp/ExternalProgram.cc	2012-06-01 16:25:37.254305681 -0700
@@ -22,6 +22,7 @@
 #include <cstring> // strsignal
 #include <iostream>
 #include <sstream>
+#include <cstdio>
 
 #include "zypp/base/Logger.h"
 #include "zypp/base/String.h"
Index: git/zypp/PluginScript.cc
===================================================================
--- git.orig/zypp/PluginScript.cc	2012-06-01 16:21:37.814294089 -0700
+++ git/zypp/PluginScript.cc	2012-06-01 16:24:41.002302961 -0700
@@ -14,6 +14,7 @@
 
 #include <iostream>
 #include <sstream>
+#include <cstdio>
 
 #include "zypp/base/LogTools.h"
 #include "zypp/base/DefaultIntegral.h"
@@ -336,7 +337,7 @@
     if ( fd == -1 )
       ZYPP_THROW( PluginScriptException( "Bad file descriptor" ) );
 
-    ::clearerr( filep );
+    std::clearerr( filep );
     std::string data;
     {
       PluginDebugBuffer _debug( data ); // dump receive buffer if PLUGIN_DEBUG
@@ -370,7 +371,7 @@
 	    int retval = select( fd+1, &rfds, NULL, NULL, &tv );
 	    if ( retval > 0 )	// FD_ISSET( fd, &rfds ) will be true.
 	    {
-	      ::clearerr( filep );
+	      std::clearerr( filep );
 	    }
 	    else if ( retval == 0 )
 	    {