aboutsummaryrefslogtreecommitdiff
path: root/backends/audiocd
diff options
context:
space:
mode:
authorJohannes Schickel2016-03-15 14:23:56 +0100
committerJohannes Schickel2016-03-15 14:24:23 +0100
commit7725e00e9a10f5bb93ebad2c1befdc448e0d945c (patch)
tree9380283f244517a49236e9f10a95c17ef43329d6 /backends/audiocd
parentf75bc481415c0b3e56627aaa84c6151a62c789b5 (diff)
downloadscummvm-rg350-7725e00e9a10f5bb93ebad2c1befdc448e0d945c.tar.gz
scummvm-rg350-7725e00e9a10f5bb93ebad2c1befdc448e0d945c.tar.bz2
scummvm-rg350-7725e00e9a10f5bb93ebad2c1befdc448e0d945c.zip
LINUX: Guard Linux audio CD code.
Diffstat (limited to 'backends/audiocd')
-rw-r--r--backends/audiocd/linux/linux-audiocd.cpp19
-rw-r--r--backends/audiocd/linux/linux-audiocd.h2
2 files changed, 15 insertions, 6 deletions
diff --git a/backends/audiocd/linux/linux-audiocd.cpp b/backends/audiocd/linux/linux-audiocd.cpp
index a86860106a..a5838e1c5a 100644
--- a/backends/audiocd/linux/linux-audiocd.cpp
+++ b/backends/audiocd/linux/linux-audiocd.cpp
@@ -42,15 +42,13 @@
*
*/
-#include <errno.h>
-#include <fcntl.h>
-#include <unistd.h>
-#include <linux/cdrom.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
+// Enable all forbidden symbols to allow us to include and use necessary APIs.
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "backends/audiocd/linux/linux-audiocd.h"
+#ifdef USE_LINUXCD
+
#include "backends/audiocd/audiocd-stream.h"
#include "backends/audiocd/default/default-audiocd.h"
#include "common/array.h"
@@ -58,6 +56,13 @@
#include "common/str.h"
#include "common/debug.h"
+#include <errno.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <linux/cdrom.h>
+#include <sys/ioctl.h>
+#include <sys/stat.h>
+
enum {
kLeadoutTrack = 0xAA
};
@@ -460,3 +465,5 @@ bool LinuxAudioCDManager::hasDevice(const DeviceList &devices, dev_t device) {
AudioCDManager *createLinuxAudioCDManager() {
return new LinuxAudioCDManager();
}
+
+#endif // USE_LINUXCD
diff --git a/backends/audiocd/linux/linux-audiocd.h b/backends/audiocd/linux/linux-audiocd.h
index 69046e936a..09d6353991 100644
--- a/backends/audiocd/linux/linux-audiocd.h
+++ b/backends/audiocd/linux/linux-audiocd.h
@@ -45,6 +45,8 @@
#ifndef BACKENDS_AUDIOCD_LINUX_H
#define BACKENDS_AUDIOCD_LINUX_H
+#include "common/scummsys.h"
+
#ifdef USE_LINUXCD
class AudioCDManager;