From 47c095da5dad0bf7a2dd2c9b7fbcd28276c518e4 Mon Sep 17 00:00:00 2001
From: Matthew White <mehw.is.me@inventati.org>
Date: Wed, 10 Nov 2021 19:15:04 +0000
Subject: [PATCH] fix compilation problems

Revert and fix b9acb7cd4ecb313fe68ab385ae7a248a29671040: replace
__I386__ with __i386__, and __x86-64__ with __x86_64__.  The 'or'
condition '||' is incompatible with the directive '#ifdef', hence
use '#if defined(__i386__) || defined(__x86_64__)'.

In plugins/livevideo/livevideo.C use HAVE_DB, rather than HAVE_LIBDV,
to properly compile with DV when libdv was enabled.  Here, HAVE_LIBDV
will always be undefined... the correct variable set during configure
is HAVE_DB.
---
 cinelerra-5.1/cinelerra/commercials.h       | 2 ++
 cinelerra-5.1/cinelerra/dbwindow.h          | 2 ++
 cinelerra-5.1/cinelerra/mediadb.h           | 2 ++
 cinelerra-5.1/db/tdb.h                      | 2 ++
 cinelerra-5.1/plugins/livevideo/livevideo.C | 2 +-
 5 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/cinelerra-5.1/cinelerra/commercials.h b/cinelerra-5.1/cinelerra/commercials.h
index b7b815c4..443cf6c7 100644
--- a/cinelerra-5.1/cinelerra/commercials.h
+++ b/cinelerra-5.1/cinelerra/commercials.h
@@ -1,3 +1,4 @@
+#if defined(__i386__) || defined(__x86_64__)
 #ifndef _COMMERCIALS_H_
 #define _COMMERCIALS_H_
 
@@ -202,3 +203,4 @@ public:
 
 
 #endif
+#endif /* x86 */
\ No newline at end of file
diff --git a/cinelerra-5.1/cinelerra/dbwindow.h b/cinelerra-5.1/cinelerra/dbwindow.h
index 24a40df8..103beb6d 100644
--- a/cinelerra-5.1/cinelerra/dbwindow.h
+++ b/cinelerra-5.1/cinelerra/dbwindow.h
@@ -1,3 +1,4 @@
+#if defined(__i386__) || defined(__x86_64__)
 #ifndef _DBWINDOW_H_
 #define _DBWINDOW_H_
 
@@ -296,3 +297,4 @@ public:
 
 
 #endif
+#endif /* x86 */
\ No newline at end of file
diff --git a/cinelerra-5.1/cinelerra/mediadb.h b/cinelerra-5.1/cinelerra/mediadb.h
index 9bb970ee..f55cc6b0 100644
--- a/cinelerra-5.1/cinelerra/mediadb.h
+++ b/cinelerra-5.1/cinelerra/mediadb.h
@@ -1,3 +1,4 @@
+#if defined(__i386__) || defined(__x86_64__)
 #ifndef _MEDIA_DB_H_
 #define _MEDIA_DB_H_
 
@@ -239,3 +240,4 @@ public:
 };
 
 #endif
+#endif /* x86 */
\ No newline at end of file
diff --git a/cinelerra-5.1/db/tdb.h b/cinelerra-5.1/db/tdb.h
index 8ee88002..24c8617c 100644
--- a/cinelerra-5.1/db/tdb.h
+++ b/cinelerra-5.1/db/tdb.h
@@ -1,3 +1,4 @@
+#if defined(__i386__) || defined(__x86_64__)
 #ifndef __DB_H__
 #define __DB_H__
 #include <cstring>
@@ -1514,3 +1515,4 @@ public:
 };
 
 #endif
+#endif /* x86 */
\ No newline at end of file
diff --git a/cinelerra-5.1/plugins/livevideo/livevideo.C b/cinelerra-5.1/plugins/livevideo/livevideo.C
index c30034ab..ac69ba20 100644
--- a/cinelerra-5.1/plugins/livevideo/livevideo.C
+++ b/cinelerra-5.1/plugins/livevideo/livevideo.C
@@ -31,7 +31,7 @@
 #include "filexml.h"
 #include "guicast.h"
 #include "language.h"
-#if HAVE_LIBDV
+#if HAVE_DV
 #include "libdv.h"
 #endif
 #include "libmjpeg.h"
-- 
2.32.0

