mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-30 13:41:48 +00:00
mpg123: fix build with msvc
Fix syntax errors when compiling against cerbero-provided libmpg123 headers. We do the same as the libmpg123 internal visual studio build here. mpg123.h(1378): error C2143: syntax error: missing ')' before '(' mpg123.h(1378): error C2081: 'ssize_t': name in formal parameter list illegal mpg123.h(1378): error C2143: syntax error: missing ')' before '*' mpg123.h(1378): error C2091: function returns function mpg123.h(1378): error C2143: syntax error: missing '{' before '*' mpg123.h(1378): error C2059: syntax error: ')' mpg123.h(1379): error C2143: syntax error: missing ')' before '*' mpg123.h(1379): error C2365: 'off_t': redefinition; previous definition was 'typedef' ...
This commit is contained in:
parent
fd5a868c11
commit
36d972e01a
1 changed files with 12 additions and 0 deletions
|
@ -19,6 +19,18 @@
|
|||
#ifndef __GST_MPG123_AUDIO_DEC_H__
|
||||
#define __GST_MPG123_AUDIO_DEC_H__
|
||||
|
||||
/* This is what the visual studio build in mpg123 does before including the
|
||||
* original header file. Without this we get syntax errors in the
|
||||
* replace_reader function declarations because it doesn't know ssize_t etc.
|
||||
* It doesn't realy matter for us if the ssize_t typedef here is correct. */
|
||||
#ifdef _MSC_VER
|
||||
#include <tchar.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>
|
||||
typedef long ssize_t;
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#include <gst/gst.h>
|
||||
#include <gst/audio/gstaudiodecoder.h>
|
||||
#include <mpg123.h>
|
||||
|
|
Loading…
Reference in a new issue