closedcaption: Fix build with MSVC

Undefined ssize_t is used in eia608.h file as well
This commit is contained in:
Seungha Yang 2021-04-01 14:07:05 +09:00
parent 195f22c2e3
commit 3dda2aebe9
2 changed files with 6 additions and 9 deletions

View file

@ -31,15 +31,6 @@ extern "C" {
#include "utf8.h"
#include "xds.h"
// ssize_t is POSIX and does not exist on Windows
#if defined(_MSC_VER)
#if defined(_WIN64)
typedef signed long ssize_t;
#else
typedef signed int ssize_t;
#endif
#endif
typedef enum {
LIBCAPTION_ERROR = 0,
LIBCAPTION_OK = 1,

View file

@ -44,6 +44,12 @@ extern const char* eia608_style_map[];
#ifndef inline
#define inline __inline
#endif
// ssize_t is POSIX and does not exist on Windows
#if defined(_WIN64)
typedef signed long ssize_t;
#else
typedef signed int ssize_t;
#endif
#endif
/*! \brief