From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: passt.top; dkim=pass (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20230601 header.b=RRnMK6wK; dkim-atps=neutral Received: from mail-qk1-x74a.google.com (mail-qk1-x74a.google.com [IPv6:2607:f8b0:4864:20::74a]) by passt.top (Postfix) with ESMTPS id 700B35A004E for ; Mon, 23 Feb 2026 18:27:51 +0100 (CET) Received: by mail-qk1-x74a.google.com with SMTP id af79cd13be357-8c70ef98116so4910230885a.1 for ; Mon, 23 Feb 2026 09:27:51 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20230601; t=1771867670; x=1772472470; darn=passt.top; h=cc:to:from:subject:message-id:mime-version:date:from:to:cc:subject :date:message-id:reply-to; bh=5k2BxDnMv0HC2tLGESPH5d8NaylR+AglOJ2k6u+zVls=; b=RRnMK6wKLUZ4plUIYf+gNvZ2JjRhuSdvsq+BxneCY0e6Z12Q77ul8S4se7XMl1UU7q tEFYwKSQ1vxlIjGpa4NQtjXf/Mlj6POT/Gnsuyx9kY5L0SdsIizk2UYVbZh1nWH/uYB1 ZoJG7/UeTYi/iicrqkjVOojzizjd+wq0PuCOht1iRI3hFN9M+xFGiU179bxnKvA730sO W8GDkQ5Kb7uJ+TCr5UIjKqBlBn7Fj4OiSFKOWWEnSwHMuB8ZUV4jJ8N8krDE6iMTy75R QBgrH0LCvJ4gJfuNEjfuT1uW3p/PDqkz+sPzplqIFTntM5eMn5UdapshrqRKr5lZROM0 b+Ig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1771867670; x=1772472470; h=cc:to:from:subject:message-id:mime-version:date:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=5k2BxDnMv0HC2tLGESPH5d8NaylR+AglOJ2k6u+zVls=; b=g2+ILW9Qmqpiv1Bfg47p0OSg4xAGFoREufWL8+OwAOxqir5fCeUNCXZFamtqTmPZzd QpfZ3vNcChV82J4ix3b9YD2Br/CLKuggDge7Pr93pI6hHgvVLc50rrURe0PpPybFTllm i8g1clAQTBgh+bOGscLMEW4LeC/+DQXsXNh1Ym2KLlzsmWu4/lXVqJNRWDCGCKDlJSqz aJg3EQpUuUxUozR8DunNOyJputQg4X5hQox5ZoYi/rzWfvIRD5MybOUi1f/+6cvj6VgR Nl+/c7eix5ne8O4bKt5y8wKI5feqra1u8g+7Wzk1BjwDueQQSll1DSo7W1yvlfb8ZX6C FMkg== X-Gm-Message-State: AOJu0Yz9tTyJtC220VGwk4URf/0uhBHMEjexN/4brm4IFUfpweJjEXxe 2WQqexqeGzJut3iP61vzP9DL2A9jO15GLpcGuUVA6gMJryIoPcyEewmL6CSc7T/G3Z/pplbXHGG Gd/LsriZcijbaNMFy3Zw85RISZA7VHlOFNXwUAsiNXvECgbkcET09yyZ2RHKkySnGIoH4DnS56p /lBOEQ4SLMUSpzCPaxVnnUcKr56RF2l1RDpf468g== X-Received: from qknb12.prod.google.com ([2002:a05:620a:f8c:b0:8cb:3d67:c696]) (user=pefoley job=prod-delivery.src-stubby-dispatcher) by 2002:a05:620a:4505:b0:8c6:a5aa:465c with SMTP id af79cd13be357-8cb8ca8202cmr1154642285a.55.1771867669411; Mon, 23 Feb 2026 09:27:49 -0800 (PST) Date: Mon, 23 Feb 2026 12:27:39 -0500 Mime-Version: 1.0 X-Mailer: git-send-email 2.53.0.371.g1d285c8824-goog Message-ID: <20260223172739.144834-1-pefoley@google.com> Subject: [PATCH] Fix build when HAS_GETRANDOM is undefined From: Peter Foley To: passt-dev@passt.top Content-Type: text/plain; charset="UTF-8" X-MailFrom: 3FY6caQcKCfYncdmjcwemmejc.amknYqqr-bctnYqqr.rmn@flex--pefoley.bounces.google.com X-Mailman-Rule-Hits: nonmember-moderation X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation Message-ID-Hash: XL75OHGA5BC6XY4UVEG2M3CJ5EG3EMAB X-Message-ID-Hash: XL75OHGA5BC6XY4UVEG2M3CJ5EG3EMAB X-Mailman-Approved-At: Mon, 23 Feb 2026 18:41:39 +0100 CC: Peter Foley X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: e.g. util.c:1163:14: error: use of undeclared identifier 'dev_random'; did you mean 'raw_random'? 1163 | ret = read(dev_random, (char *)buf + random_read, Signed-off-by: Peter Foley --- util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util.c b/util.c index db27431..a4f2be4 100644 --- a/util.c +++ b/util.c @@ -1160,7 +1160,7 @@ void raw_random(void *buf, size_t buflen) ret = getrandom((char *)buf + random_read, buflen - random_read, GRND_RANDOM); #else - ret = read(dev_random, (char *)buf + random_read, + ret = read(fd, (char *)buf + random_read, buflen - random_read); #endif @@ -1177,7 +1177,7 @@ void raw_random(void *buf, size_t buflen) } #ifndef HAS_GETRANDOM - close(dev_random); + close(fd); #endif if (random_read < buflen) -- 2.53.0.371.g1d285c8824-goog