# Patch to fix compilation issues with newer GCC
# Copyright (C) 2011,2012 Georgi D. Sotirov <gdsotirov@dir.bg>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; either version 2
# of the License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
#
# Visit SlackPack at http://sotirov-bg.net/slackpack/
#
# $Id: libfreebob-1.0.11.diff,v 1.2 2012/09/17 19:29:55 gsotirov Exp $
#

diff -urNad libfreebob-1.0.11-orig/src/debugmodule/debugmodule.cpp libfreebob-1.0.11/src/debugmodule/debugmodule.cpp
--- libfreebob-1.0.11-orig/src/debugmodule/debugmodule.cpp	2007-10-15 21:15:09.000000000 +0300
+++ libfreebob-1.0.11/src/debugmodule/debugmodule.cpp	2012-09-17 22:09:52.000000000 +0300
@@ -20,6 +20,7 @@
 
 #include "debugmodule.h"
 
+#include <cstdio>
 #include <stdarg.h>
 #include <netinet/in.h>
 
diff -urNad libfreebob-1.0.11-orig/src/libfreebobavc/avc_extended_plug_info.cpp libfreebob-1.0.11/src/libfreebobavc/avc_extended_plug_info.cpp
--- libfreebob-1.0.11-orig/src/libfreebobavc/avc_extended_plug_info.cpp	2007-10-15 21:15:08.000000000 +0300
+++ libfreebob-1.0.11/src/libfreebobavc/avc_extended_plug_info.cpp	2012-09-17 22:06:10.000000000 +0300
@@ -23,6 +23,8 @@
 #include "ieee1394service.h"
 
 #include <cstdlib>
+#include <cstdio>
+#include <cstring>
 #include <netinet/in.h>
 #include <iostream>
 
@@ -120,7 +122,7 @@
     return true;
 }
 
-ExtendedPlugInfoPlugNameSpecificData::ExtendedPlugInfoPlugNameSpecificData*
+ExtendedPlugInfoPlugNameSpecificData*
 ExtendedPlugInfoPlugNameSpecificData::clone() const
 {
     return new ExtendedPlugInfoPlugNameSpecificData( *this );
@@ -156,7 +158,7 @@
     return true;
 }
 
-ExtendedPlugInfoPlugNumberOfChannelsSpecificData::ExtendedPlugInfoPlugNumberOfChannelsSpecificData*
+ExtendedPlugInfoPlugNumberOfChannelsSpecificData*
 ExtendedPlugInfoPlugNumberOfChannelsSpecificData::clone() const
 {
     return new ExtendedPlugInfoPlugNumberOfChannelsSpecificData( *this );
@@ -229,7 +231,7 @@
     return true;
 }
 
-ExtendedPlugInfoPlugChannelPositionSpecificData::ExtendedPlugInfoPlugChannelPositionSpecificData*
+ExtendedPlugInfoPlugChannelPositionSpecificData*
 ExtendedPlugInfoPlugChannelPositionSpecificData::clone() const
 {
     return new ExtendedPlugInfoPlugChannelPositionSpecificData( *this );
@@ -287,7 +289,7 @@
     return true;
 }
 
-ExtendedPlugInfoPlugChannelNameSpecificData::ExtendedPlugInfoPlugChannelNameSpecificData*
+ExtendedPlugInfoPlugChannelNameSpecificData*
 ExtendedPlugInfoPlugChannelNameSpecificData::clone() const
 {
     return new ExtendedPlugInfoPlugChannelNameSpecificData( *this );
@@ -334,7 +336,7 @@
     return m_plugAddress->deserialize( de );
 }
 
-ExtendedPlugInfoPlugInputSpecificData::ExtendedPlugInfoPlugInputSpecificData*
+ExtendedPlugInfoPlugInputSpecificData*
 ExtendedPlugInfoPlugInputSpecificData::clone() const
 {
     return new ExtendedPlugInfoPlugInputSpecificData( *this );
@@ -410,7 +412,7 @@
     return true;
 }
 
-ExtendedPlugInfoPlugOutputSpecificData::ExtendedPlugInfoPlugOutputSpecificData*
+ExtendedPlugInfoPlugOutputSpecificData*
 ExtendedPlugInfoPlugOutputSpecificData::clone() const
 {
     return new ExtendedPlugInfoPlugOutputSpecificData( *this );
@@ -472,7 +474,7 @@
     return true;
 }
 
-ExtendedPlugInfoClusterInfoSpecificData::ExtendedPlugInfoClusterInfoSpecificData*
+ExtendedPlugInfoClusterInfoSpecificData*
 ExtendedPlugInfoClusterInfoSpecificData::clone() const
 {
     return new ExtendedPlugInfoClusterInfoSpecificData( *this );
diff -urNad libfreebob-1.0.11-orig/src/libfreebobavc/avc_extended_stream_format.cpp libfreebob-1.0.11/src/libfreebobavc/avc_extended_stream_format.cpp
--- libfreebob-1.0.11-orig/src/libfreebobavc/avc_extended_stream_format.cpp	2007-10-15 21:15:08.000000000 +0300
+++ libfreebob-1.0.11/src/libfreebobavc/avc_extended_stream_format.cpp	2012-09-17 22:06:52.000000000 +0300
@@ -22,6 +22,7 @@
 #include "serialize.h"
 #include "ieee1394service.h"
 
+#include <cstdio>
 #include <netinet/in.h>
 
 ///////////////////////////////////////////////////////////
diff -urNad libfreebob-1.0.11-orig/src/libfreebobavc/avc_generic.cpp libfreebob-1.0.11/src/libfreebobavc/avc_generic.cpp
--- libfreebob-1.0.11-orig/src/libfreebobavc/avc_generic.cpp	2007-10-15 21:15:08.000000000 +0300
+++ libfreebob-1.0.11/src/libfreebobavc/avc_generic.cpp	2012-09-17 22:07:28.000000000 +0300
@@ -23,6 +23,8 @@
 #include "ieee1394service.h"
 
 #include <cstdlib>
+#include <cstdio>
+#include <cstring>
 #include <netinet/in.h>
 
 #define DEBUG_EXTRA_VERBOSE 2
diff -urNad libfreebob-1.0.11-orig/src/libfreebobavc/ieee1394service.cpp libfreebob-1.0.11/src/libfreebobavc/ieee1394service.cpp
--- libfreebob-1.0.11-orig/src/libfreebobavc/ieee1394service.cpp	2007-10-15 21:15:08.000000000 +0300
+++ libfreebob-1.0.11/src/libfreebobavc/ieee1394service.cpp	2012-09-17 22:08:10.000000000 +0300
@@ -21,6 +21,7 @@
 
 #include <libavc1394/avc1394.h>
 
+#include <cstdio>
 #include <errno.h>
 #include <netinet/in.h>
 
diff -urNad libfreebob-1.0.11-orig/src/libfreebobavc/serialize.cpp libfreebob-1.0.11/src/libfreebobavc/serialize.cpp
--- libfreebob-1.0.11-orig/src/libfreebobavc/serialize.cpp	2007-10-15 21:15:08.000000000 +0300
+++ libfreebob-1.0.11/src/libfreebobavc/serialize.cpp	2012-09-17 22:08:47.000000000 +0300
@@ -20,6 +20,7 @@
 
 #include "serialize.h"
 
+#include <cstdio>
 #include <iostream>
 #include <iomanip>
 
diff -urNad libfreebob-1.0.11-orig/tests/test-extplugcmd.cpp libfreebob-1.0.11/tests/test-extplugcmd.cpp
--- libfreebob-1.0.11-orig/tests/test-extplugcmd.cpp	2007-10-15 21:15:07.000000000 +0300
+++ libfreebob-1.0.11/tests/test-extplugcmd.cpp	2012-09-17 21:56:44.000000000 +0300
@@ -24,6 +24,7 @@
 #include "libfreebobavc/ieee1394service.h"
 
 #include <argp.h>
+#include <cstdlib>
 
 using namespace std;
 
diff -urNad libfreebob-1.0.11-orig/tests/test-volume.cpp libfreebob-1.0.11/tests/test-volume.cpp
--- libfreebob-1.0.11-orig/tests/test-volume.cpp	2007-10-15 21:15:07.000000000 +0300
+++ libfreebob-1.0.11/tests/test-volume.cpp	2012-09-17 22:10:31.000000000 +0300
@@ -22,6 +22,11 @@
 #include "libfreebobavc/serialize.h"
 #include "libfreebobavc/ieee1394service.h"
 
+#include <cstdlib>
+#include <cstdio>
+
+using namespace std;
+
 const bool bVerbose = false;
 
 short int
