Skip to content

Commit d6d5c00

Browse files
committed
TS Module: Failing CI for windows
1 parent b3b126e commit d6d5c00

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

src/rust/src/lib.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,10 @@ extern "C" {
270270
#[allow(clashing_extern_declarations)]
271271
pub fn ccx_gxf_probe(buf: *const c_uchar, len: c_int) -> c_int;
272272
pub fn ccx_gxf_init(arg: *mut ccx_demuxer) -> *mut ccx_gxf;
273+
pub fn fprintf(__stream: *mut FILE, __format: *const c_char, ...) -> ::std::os::raw::c_int;
274+
pub fn fwrite(__ptr: *const c_void, __size: c_ulong, __n: c_ulong, __s: *mut FILE) -> c_ulong;
275+
pub fn fclose(__stream: *mut FILE) -> c_int;
276+
pub fn fopen(__filename: *const c_char, __modes: *const c_char) -> *mut FILE;
273277
}
274278

275279
/// # Safety

src/rust/src/transportstream/epg_tables.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
use crate::bindings::{fclose, fopen, fprintf, fwrite, lib_ccx_ctx, net_send_epg, FILE};
1+
use crate::bindings::{lib_ccx_ctx, net_send_epg, FILE};
22
use crate::common::CType;
33
use crate::ctorust::FromCType;
44
use crate::transportstream::epg_event::{EPGEventRust, EPGRatingRust};
55
use crate::transportstream::tables::TS_PMT_MAP_SIZE;
6+
use crate::{fclose, fopen, fprintf, fwrite};
67
use chrono::{Datelike, NaiveDate, NaiveDateTime, NaiveTime, Timelike};
78
use encoding_rs::*;
89
use lib_ccxr::common::Options;
@@ -11,7 +12,7 @@ use lib_ccxr::info;
1112
use lib_ccxr::util::log::DebugMessageFlag;
1213
use std::alloc::{alloc, dealloc, realloc, Layout};
1314
use std::ffi::{CStr, CString};
14-
use std::os::raw::{c_char, c_ulong, c_void};
15+
use std::os::raw::{c_char, c_void};
1516
use std::ptr;
1617

1718
/// Specific errors for EPG DVB string decoding.
@@ -162,7 +163,7 @@ fn write_raw_bytes(f: &mut FILE, bytes: &[u8]) {
162163
fwrite(
163164
bytes.as_ptr() as *const c_void,
164165
1,
165-
bytes.len() as c_ulong,
166+
bytes.len() as _,
166167
f as *mut FILE,
167168
);
168169
}

0 commit comments

Comments
 (0)