Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
tvhcsa: fix compilation when TVHCSA is not enabled, fixes #2642
  • Loading branch information
perexg committed Jan 27, 2015
1 parent 5a063fe commit 2f13317
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/descrambler/tvhcsa.h
Expand Up @@ -64,6 +64,8 @@ typedef struct tvhcsa

} tvhcsa_t;

#if ENABLE_TVHCSA

int tvhcsa_set_type( tvhcsa_t *csa, int type );

void tvhcsa_set_key_even( tvhcsa_t *csa, const uint8_t *even );
Expand All @@ -72,4 +74,16 @@ void tvhcsa_set_key_odd ( tvhcsa_t *csa, const uint8_t *odd );
void tvhcsa_init ( tvhcsa_t *csa );
void tvhcsa_destroy ( tvhcsa_t *csa );

#else

static inline int tvhcsa_set_type( tvhcsa_t *csa, int type ) { return -1; }

static inline void tvhcsa_set_key_even( tvhcsa_t *csa, const uint8_t *even ) { };
static inline void tvhcsa_set_key_odd ( tvhcsa_t *csa, const uint8_t *odd ) { };

static inline void tvhcsa_init ( tvhcsa_t *csa ) { };
static inline void tvhcsa_destroy ( tvhcsa_t *csa ) { };

#endif

#endif /* __TVH_CSA_H__ */

0 comments on commit 2f13317

Please sign in to comment.