diff options
-rw-r--r-- | compat/camera-names.cpp | 6 | ||||
-rw-r--r-- | compat/process-list.hpp | 2 | ||||
-rw-r--r-- | video-opencv/video-property-page.cpp | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/compat/camera-names.cpp b/compat/camera-names.cpp index 8e777028..5d190943 100644 --- a/compat/camera-names.cpp +++ b/compat/camera-names.cpp @@ -7,7 +7,7 @@ # include <cwchar> # define NO_DSHOW_STRSAFE # include <dshow.h> -#elif defined(__unix) || defined(__linux) || defined(__APPLE__) +#elif defined(__unix) || defined(__linux__) || defined(__APPLE__) # include <unistd.h> #endif @@ -15,7 +15,7 @@ # include <QCameraInfo> #endif -#ifdef __linux +#ifdef __linux__ # include <fcntl.h> # include <sys/ioctl.h> # include <linux/videodev2.h> @@ -91,7 +91,7 @@ std::vector<std::tuple<QString, int>> get_camera_names() pSysDevEnum->Release(); #endif -#ifdef __linux +#ifdef __linux__ for (int i = 0; i < 16; i++) { char buf[32]; snprintf(buf, sizeof(buf), "/dev/video%d", i); diff --git a/compat/process-list.hpp b/compat/process-list.hpp index d1f9999f..782dc0a4 100644 --- a/compat/process-list.hpp +++ b/compat/process-list.hpp @@ -129,7 +129,7 @@ static QStringList get_all_executable_names() } } -#elif defined __linux +#elif defined __linux__ #include <proc/readproc.h> #include <cerrno> diff --git a/video-opencv/video-property-page.cpp b/video-opencv/video-property-page.cpp index 8057bf9e..d56d4b91 100644 --- a/video-opencv/video-property-page.cpp +++ b/video-opencv/video-property-page.cpp @@ -147,7 +147,7 @@ bool video_property_page::show(int idx) return true; } -#elif defined(__linux) +#elif defined(__linux__) # include <QProcess> # include "compat/camera-names.hpp" |