[mythtv] lcddevice.cpp:137: error: ‘system’ was not declared in this scope

Ruediger Oertel ro at suse.de
Sun Nov 4 13:20:14 UTC 2007


On Sun, 4 Nov 2007, Ruediger Oertel wrote:

> On Sun, 4 Nov 2007, Bart Schelstraete wrote:
> 
> > > > Anybody who has the same problem, and knows what to do?
> > >
> > > wild guess: you are using a gcc-4.3 snapshot.
> > > try to include <stdlib.h> or <cstdlib> which should help.
> > >
> > > I've already got a patch to be able to compile mythtv with
> > > gcc-4.3 but haven't got around to go all the way through mythplugins
> > > yet.
> > >
> > 
> > Indeed, I'm currently solving this by adding "#include <stdlib.h>" to
> > the cpp files.
> > And until now the build is working, except for the osdsurface.h, which
> > contained the  'int ystride' 2 times..which resulted in an error.
> 
> yes ...
> 
> I've attached my current patch for mythtv now.

and now the one for mythplugins (attached)

-- 
with kind regards (mit freundlichem Grinsen),
   Ruediger Oertel (ro at novell.com,ro at suse.de,bugfinder at t-online.de)
----------------------------------------------------------------------
Linux Fatou 2.6.23.1-6-default #1 SMP 2007/10/19 20:37:48 UTC x86_64
Key fingerprint = 17DC 6553 86A7 384B 53C5  CA5C 3CE4 F2E7 23F2 B417
SUSE LINUX Products GmbH,  GF: Markus Rex,   HRB 16746 (AG Nürnberg)
-------------- next part --------------
--- mytharchive/mytharchive/fileselector.cpp
+++ mytharchive/mytharchive/fileselector.cpp
@@ -1,3 +1,4 @@
+#include <cstdlib>
 // Qt
 #include <qdir.h>
 #include <qapplication.h>
--- mytharchive/mytharchive/importnativewizard.cpp
+++ mytharchive/mytharchive/importnativewizard.cpp
@@ -1,3 +1,4 @@
+#include <cstdlib>
 // Qt
 #include <qdir.h>
 #include <qapplication.h>
--- mytharchive/mytharchive/logviewer.cpp
+++ mytharchive/mytharchive/logviewer.cpp
@@ -1,5 +1,6 @@
 #include <unistd.h>
 #include <iostream>
+#include <cstdlib>
 
 using namespace std;
 
--- mytharchive/mytharchive/main.cpp
+++ mytharchive/mytharchive/main.cpp
@@ -8,6 +8,7 @@
 #include "config.h"
 
 #include <iostream>
+#include <cstdlib>
 #include <signal.h>
 
 using namespace std;
--- mytharchive/mytharchive/thumbfinder.cpp
+++ mytharchive/mytharchive/thumbfinder.cpp
@@ -1,4 +1,5 @@
 #include <math.h>
+#include <cstdlib>
 
 // qt
 #include <qdir.h>
--- mytharchive/mytharchivehelper/main.cpp
+++ mytharchive/mytharchivehelper/main.cpp
@@ -2,6 +2,7 @@
 #include <stdint.h>
 #include <sys/wait.h>  // for WIFEXITED and WEXITSTATUS
 #include <unistd.h>
+#include <cstdlib>
 
 #include <mythtv/mythconfig.h>
 #ifdef CONFIG_DARWIN
--- mythflix/mythflix/mythflix.cpp
+++ mythflix/mythflix/mythflix.cpp
@@ -20,6 +20,7 @@
  * ============================================================ */
 
 #include <iostream>
+#include <cstdlib>
 
 #include <unistd.h>
 
--- mythflix/mythflix/mythflixconfig.cpp
+++ mythflix/mythflix/mythflixconfig.cpp
@@ -21,6 +21,7 @@
 
 #include <qapplication.h>
 #include <iostream>
+#include <cstdlib>
 
 #include <qptrlist.h>
 #include <qstring.h>
--- mythflix/mythflix/mythflixqueue.cpp
+++ mythflix/mythflix/mythflixqueue.cpp
@@ -20,6 +20,7 @@
  * ============================================================ */
 
 #include <iostream>
+#include <cstdlib>
 
 #include <unistd.h>
 
--- mythmovies/mythmovies/moviesui.cpp
+++ mythmovies/mythmovies/moviesui.cpp
@@ -5,6 +5,7 @@
 #include <mythtv/uitypes.h>
 #include <qprocess.h>
 #include <unistd.h>
+#include <cstdlib>
 
 #include "moviesui.h"
 
--- mythmusic/mythmusic/directoryfinder.cpp
+++ mythmusic/mythmusic/directoryfinder.cpp
@@ -1,3 +1,4 @@
+#include <cstdlib>
 // Qt
 #include <qdir.h>
 #include <qapplication.h>
--- mythnews/mythnews/mythnews.cpp
+++ mythnews/mythnews/mythnews.cpp
@@ -22,6 +22,7 @@
 #include <iostream>
 #include <math.h>
 #include <unistd.h>
+#include <cstdlib>
 
 #include <qapplication.h>
 #include <qnetwork.h>
--- mythnews/mythnews/mythnewsconfig.cpp
+++ mythnews/mythnews/mythnewsconfig.cpp
@@ -21,6 +21,7 @@
 
 #include <qapplication.h>
 #include <iostream>
+#include <cstdlib>
 
 #include <qptrlist.h>
 #include <qstring.h>
--- mythphone/mythphone/h263.cpp
+++ mythphone/mythphone/h263.cpp
@@ -12,6 +12,7 @@
 #include <qimage.h>
 
 #include <iostream>
+#include <cstdlib>
 using namespace std;
 
 #ifndef WIN32
--- mythphone/mythphone/main.cpp
+++ mythphone/mythphone/main.cpp
@@ -8,6 +8,7 @@
 */
 
 #include <iostream>
+#include <cstdlib>
 using namespace std;
 
 #include <qapplication.h>
--- mythphone/mythphone/vxml.cpp
+++ mythphone/mythphone/vxml.cpp
@@ -107,6 +107,7 @@
 #include <unistd.h>
 #include <math.h>
 #include <iostream>
+#include <cstdlib>
 
 #include <mythtv/mythcontext.h>
 
--- mythvideo/mtd/logging.cpp
+++ mythvideo/mtd/logging.cpp
@@ -10,6 +10,7 @@
 #include "logging.h"
 
 #include <unistd.h>
+#include <cstdlib>
 #include <qdatetime.h>
 
 #include <mythtv/mythcontext.h>
--- mythvideo/mtd/mtd.cpp
+++ mythvideo/mtd/mtd.cpp
@@ -9,6 +9,7 @@
 */
 
 #include <unistd.h>
+#include <cstdlib>
 #include <qstringlist.h>
 #include <qregexp.h>
 #include <qdir.h>
--- mythvideo/mythvideo/dbaccess.cpp
+++ mythvideo/mythvideo/dbaccess.cpp
@@ -4,6 +4,7 @@
 #include "dbaccess.h"
 #include "cleanup.h"
 
+#include <algorithm>
 #include <vector>
 #include <map>
 
--- mythvideo/mythvideo/editmetadata.cpp
+++ mythvideo/mythvideo/editmetadata.cpp
@@ -10,6 +10,8 @@
 #include <mythtv/mythcontext.h>
 #include <mythtv/uitypes.h>
 
+#include <algorithm>
+
 #include "globals.h"
 #include "editmetadata.h"
 #include "metadata.h"
--- mythvideo/mythvideo/videodlg.cpp
+++ mythvideo/mythvideo/videodlg.cpp
@@ -1,3 +1,5 @@
+#include <cstdlib>
+
 #include <qapplication.h>
 
 #include <mythtv/xmlparse.h>
--- mythvideo/mythvideo/videogallery.cpp
+++ mythvideo/mythvideo/videogallery.cpp
@@ -15,6 +15,7 @@
 #include <qstringlist.h>
 #include <qpixmap.h>
 #include <unistd.h>
+#include <cstdlib>
 
 #include <cmath>
 
--- mythvideo/mythvideo/videomanager.cpp
+++ mythvideo/mythvideo/videomanager.cpp
@@ -8,6 +8,7 @@
 #include <qpainter.h>
 
 #include <unistd.h>
+#include <cstdlib>
 
 #include <memory>
 
--- mythvideo/mythvideo/videoselected.cpp
+++ mythvideo/mythvideo/videoselected.cpp
@@ -16,6 +16,7 @@
 #include <qpixmap.h>
 
 #include <unistd.h>
+#include <cstdlib>
 
 #include <mythtv/mythcontext.h>
 #include <mythtv/xmlparse.h>
--- mythweather/mythweather/weather.cpp
+++ mythweather/mythweather/weather.cpp
@@ -12,6 +12,7 @@
 #include <qapplication.h>
 
 #include <unistd.h>
+#include <cstdlib>
 
 #include <mythtv/mythcontext.h>
 #include <mythtv/mythdbcon.h>
--- mythzoneminder/mythzmserver/main.cpp
+++ mythzoneminder/mythzmserver/main.cpp
@@ -16,6 +16,8 @@
 #include <iostream>
 #include <string>
 #include <unistd.h>
+#include <cstdlib>
+#include <cstring>
 #include <map>
 #include <sys/types.h>
 #include <sys/socket.h>
--- mythzoneminder/mythzmserver/zmserver.cpp
+++ mythzoneminder/mythzmserver/zmserver.cpp
@@ -15,6 +15,8 @@
 
 
 #include <iostream>
+#include <cstdlib>
+#include <cstring>
 #include <errno.h>
 #include <sys/socket.h>
 #include <fcntl.h>
--- mythzoneminder/mythzoneminder/zmconsole.cpp
+++ mythzoneminder/mythzoneminder/zmconsole.cpp
@@ -14,6 +14,7 @@
 
 #include <iostream>
 #include <unistd.h>
+#include <cstdlib>
 
 // qt
 #include <qdatetime.h>
--- mythzoneminder/mythzoneminder/zmevents.cpp
+++ mythzoneminder/mythzoneminder/zmevents.cpp
@@ -13,6 +13,7 @@
  * ============================================================ */
 
 #include <iostream>
+#include <cstdlib>
 
 // qt
 #include <qdatetime.h>
--- mythzoneminder/mythzoneminder/zmliveplayer.cpp
+++ mythzoneminder/mythzoneminder/zmliveplayer.cpp
@@ -14,6 +14,7 @@
 
 #include <iostream>
 #include <sys/shm.h>
+#include <cstdlib>
 
 // qt
 #include <qdatetime.h>
--- mythzoneminder/mythzoneminder/zmplayer.cpp
+++ mythzoneminder/mythzoneminder/zmplayer.cpp
@@ -13,6 +13,7 @@
  * ============================================================ */
 
 #include <iostream>
+#include <cstdlib>
 
 // qt
 #include <qdatetime.h>


More information about the mythtv-dev mailing list