Fix for certain libjpeg versions that override INLINE macro

This commit is contained in:
rdb 2017-06-12 19:46:59 +02:00
parent 88e963b936
commit ca2e96d296
2 changed files with 18 additions and 0 deletions

View File

@ -36,6 +36,10 @@
#include <png.h>
#endif
// jconfig.h overrides our INLINE definition.
#ifdef __GNUC__
#pragma push_macro("INLINE")
#endif
extern "C" {
#include <stdio.h> // jpeglib requires this to be included first.
@ -43,6 +47,11 @@ extern "C" {
#include <setjmp.h>
}
// Restore our own INLINE definition.
#ifdef __GNUC__
#pragma pop_macro("INLINE")
#endif
/**
* For reading and writing Jpeg files.
*/

View File

@ -24,9 +24,18 @@
#include <linux/videodev2.h>
#ifdef HAVE_JPEG
// jconfig.h overrides our INLINE definition.
#ifdef __GNUC__
#pragma push_macro("INLINE")
#endif
extern "C" {
#include <jpeglib.h>
}
#ifdef __GNUC__
#pragma pop_macro("INLINE")
#endif
#endif
class WebcamVideoV4L;