Skip to content

Commit f5e0cee

Browse files
committed
Fix build issues
1 parent e92a536 commit f5e0cee

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

nim/dff/client.nim

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ proc newClient*(name: string, processFunc: ProcessFunc): Client =
3232

3333
proc connect*(client: Client) =
3434
## Establishes a connection to the fuzzing server.
35-
client.conn = newSocket(AF_UNIX, SOCK_STREAM, IPPROTO_IP)
35+
client.conn = newSocket(Domain.AF_UNIX, SockType.SOCK_STREAM, Protocol.IPPROTO_IP)
3636
client.conn.connectUnix(SocketPath)
3737
client.conn.send(client.name)
3838

@@ -92,8 +92,8 @@ proc run*(client: Client) =
9292
## Runs the client fuzzing loop.
9393
echo "Client running... Press Ctrl+C to exit."
9494

95-
c_signal(SIGINT, signalHandler)
96-
c_signal(SIGTERM, signalHandler)
95+
signal(SIGINT, signalHandler)
96+
signal(SIGTERM, signalHandler)
9797

9898
var iterationCount = 0
9999
var totalProcessingMs = 0.0

rust/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/src/server.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,8 @@ impl Server {
357357
// Process all clients concurrently like Go does
358358
let mut tasks = Vec::new();
359359

360-
for client_name in client_names {
360+
for client_name in &client_names {
361+
let client_name = client_name.clone();
361362
let inputs = inputs.clone();
362363
let clients = self.clients.clone();
363364
let task = tokio::spawn(async move {
@@ -555,8 +556,6 @@ impl Server {
555556
inputs: &[Vec<u8>],
556557
client_results: &std::collections::HashMap<String, Vec<u8>>,
557558
) -> Result<()> {
558-
use std::io::Write;
559-
560559
let findings_dir = format!("findings/{}", iteration);
561560
std::fs::create_dir_all(&findings_dir).map_err(|e| {
562561
crate::Error::Client(format!("Failed to create findings directory: {}", e))

0 commit comments

Comments
 (0)