From 3e009479c8ced86842022213cc60c70d5179c0e5 Mon Sep 17 00:00:00 2001 From: sqlerrorthing <148702857+sqlerrorthing@users.noreply.github.com> Date: Wed, 29 Oct 2025 06:08:28 +0800 Subject: [PATCH] idk rename main --- rust/build.rs | 1 + rust/src/libnfqws.rs | 1 - rust/src/main.rs | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/build.rs b/rust/build.rs index 6aa2328..2675ea2 100644 --- a/rust/build.rs +++ b/rust/build.rs @@ -12,6 +12,7 @@ fn main() { .file(NFQ.join("nfqws.c")) .include(&*NFQ) .flag("-w") + .flag("-Dmain=nfqws_main") .compile("libnfqws.a"); println!("cargo:rustc-link-lib=static=nfqws"); diff --git a/rust/src/libnfqws.rs b/rust/src/libnfqws.rs index 32af99c..7fd44bb 100644 --- a/rust/src/libnfqws.rs +++ b/rust/src/libnfqws.rs @@ -4,6 +4,5 @@ use std::ffi::c_char; #[link(name = "nfqws", kind = "static")] unsafe extern "C" { - #[link_name = "main"] pub fn nfqws_main(argc: libc::c_int, argv: *const *const c_char) -> libc::c_int; } diff --git a/rust/src/main.rs b/rust/src/main.rs index ae0ffe1..7a6a516 100644 --- a/rust/src/main.rs +++ b/rust/src/main.rs @@ -84,7 +84,7 @@ async fn main() { Some(Commands::ModuleVer) => module_version(), Some(Commands::BinVer) => todo!(), //bin_version(), //None => println!("zaprett installed. Join us: t.me/zaprett_module"), - None => run_nfqws("-v".to_string()).await.unwrap(), + None => run_nfqws("--version".to_string()).await.unwrap(), } tokio::signal::ctrl_c().await.unwrap(); }