rust: fix clippy missing_abi warning

warning: extern declarations without an explicit ABI are deprecated
  --> src/core.rs:72:1
   |
72 | extern {
   | ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
   |
   = note: `#[warn(missing_abi)]` on by default
pull/12938/head
Philippe Antoine 7 months ago committed by Victor Julien
parent 90666c7da1
commit e4f71621b7

@ -494,7 +494,7 @@ pub type GetFrameNameById = unsafe extern "C" fn(u8) -> *const c_char;
// Defined in app-layer-register.h
/// cbindgen:ignore
extern {
extern "C" {
pub fn AppLayerRegisterProtocolDetection(parser: *const RustParser, enable_default: c_int) -> AppProto;
pub fn AppLayerRegisterParserAlias(parser_name: *const c_char, alias_name: *const c_char);
pub fn AppLayerRegisterParser(parser: *const RustParser, alproto: AppProto) -> c_int;
@ -503,7 +503,7 @@ extern {
// Defined in app-layer-detect-proto.h
/// cbindgen:ignore
extern {
extern "C" {
pub fn AppLayerForceProtocolChange(f: *const Flow, new_proto: AppProto);
pub fn AppLayerProtoDetectPPRegister(ipproto: u8, portstr: *const c_char, alproto: AppProto,
min_depth: u16, max_depth: u16, dir: u8,
@ -543,7 +543,7 @@ pub const _APP_LAYER_TX_INSPECTED_TS: u8 = BIT_U8!(2);
pub const _APP_LAYER_TX_INSPECTED_TC: u8 = BIT_U8!(3);
/// cbindgen:ignore
extern {
extern "C" {
pub fn AppLayerParserStateSetFlag(state: *mut c_void, flag: u16);
pub fn AppLayerParserStateIssetFlag(state: *mut c_void, flag: u16) -> u16;
pub fn AppLayerParserSetStreamDepth(ipproto: u8, alproto: AppProto, stream_depth: u32);

@ -69,7 +69,7 @@ macro_rules!BIT_U64 {
// Defined in app-layer-protos.h
/// cbindgen:ignore
extern {
extern "C" {
pub fn StringToAppProto(proto_name: *const u8) -> AppProto;
}
@ -181,7 +181,7 @@ pub struct SuricataFileContext {
}
/// cbindgen:ignore
extern {
extern "C" {
pub fn SCGetContext() -> &'static mut SuricataContext;
}

@ -86,7 +86,7 @@ pub(crate) const SIGMATCH_QUOTES_MANDATORY: u16 = 0x40; // BIT_U16(6) in detect.
pub const SIGMATCH_INFO_STICKY_BUFFER: u16 = 0x200; // BIT_U16(9)
/// cbindgen:ignore
extern {
extern "C" {
pub fn DetectBufferSetActiveList(de: *mut c_void, s: *mut c_void, bufid: c_int) -> c_int;
pub fn DetectHelperGetData(
de: *mut c_void, transforms: *const c_void, flow: *const c_void, flow_flags: u8,

@ -24,7 +24,7 @@ use crate::core::*;
// Defined in util-file.h
/// cbindgen:ignore
extern {
extern "C" {
pub fn FileFlowFlagsToFlags(flow_file_flags: u16, flags: u8) -> u16;
}

@ -31,7 +31,7 @@ struct CFrame {
// Defined in app-layer-register.h
/// cbindgen:ignore
extern {
extern "C" {
#[cfg(not(test))]
fn AppLayerFrameNewByRelativeOffset(
flow: *const Flow, stream_slice: *const StreamSlice, frame_start_rel: u32, len: i64,

@ -25,7 +25,7 @@ use std::os::raw::c_long;
pub enum CLuaState {}
/// cbindgen:ignore
extern {
extern "C" {
fn lua_createtable(lua: *mut CLuaState, narr: c_int, nrec: c_int);
fn lua_settable(lua: *mut CLuaState, idx: c_long);
fn lua_pushlstring(lua: *mut CLuaState, s: *const c_char, len: usize);

Loading…
Cancel
Save