dvbsrc: fix building with newer kernel headers
authorMichael Olbrich <m.olbrich@pengutronix.de>
Thu, 22 May 2014 10:23:57 +0000 (12:23 +0200)
committerEdward Hervey <bilboed@bilboed.com>
Thu, 22 May 2014 11:02:13 +0000 (13:02 +0200)
c400eef3772b7dc470eefae02a1288c2b125e25c introduced some defines to handle
older kernel headers. However, the check is done before the corresponding
kernel header (dvb/frontend.h) is included. As a result the macros are
always defined with results in 'redefined' errors with newer kernel
headers.
Move the check after the include to fix this.

https://bugzilla.gnome.org/show_bug.cgi?id=730570

sys/dvb/gstdvbsrc.c

index 027281b..c2aa402 100644 (file)
 #define HAVE_V5_MINOR(minor) ((DVB_API_VERSION > 5) || \
                              (DVB_API_VERSION_MINOR >= (minor)))
 
-/* NO_STREAM_ID_FILTER introduced in minor 8 */
-#ifndef NO_STREAM_ID_FILTER
-#define NO_STREAM_ID_FILTER    (~0U)
-#endif
-
-/* DTV_STREAM_ID introduced in minor 8 (redefine) */
-#ifndef DTV_STREAM_ID
-#define DTV_STREAM_ID DTV_ISDBS_TS_ID
-#endif
-
 #ifdef HAVE_CONFIG_H
 #include "config.h"
 #endif
 
 #include <gst/gst-i18n-plugin.h>
 
+/* NO_STREAM_ID_FILTER introduced in minor 8 */
+#ifndef NO_STREAM_ID_FILTER
+#define NO_STREAM_ID_FILTER    (~0U)
+#endif
+
+/* DTV_STREAM_ID introduced in minor 8 (redefine) */
+#ifndef DTV_STREAM_ID
+#define DTV_STREAM_ID DTV_ISDBS_TS_ID
+#endif
+
 GST_DEBUG_CATEGORY_STATIC (gstdvbsrc_debug);
 #define GST_CAT_DEFAULT (gstdvbsrc_debug)