]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
tvhcsa: fix compilation when TVHCSA is not enabled, fixes #2642
authorJaroslav Kysela <perex@perex.cz>
Tue, 27 Jan 2015 18:55:37 +0000 (19:55 +0100)
committerJaroslav Kysela <perex@perex.cz>
Tue, 27 Jan 2015 18:55:37 +0000 (19:55 +0100)
src/descrambler/tvhcsa.h

index e50ea3f7fcd1f0ef6c7b33cad430b303007eba99..4a2b61467c9863d179b8b29ec58466966fb44d06 100644 (file)
@@ -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 );
@@ -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__ */