From nobody Thu Oct 20 09:24:15 2022 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MtMcH2bdcz4gKDT; Thu, 20 Oct 2022 09:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MtMcH27G1z3HwT; Thu, 20 Oct 2022 09:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666257855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bqZRq40oPaMw20tyqibWKQQRKJt3z43PhxPSaKwLZwU=; b=J1RY86kfOnB/++AkD7me+PE9loIHFTORfrMQciS0HPb41G0px/rfFfAXr0h7JVsEyyw1h7 sGf8aj9tQmYDCOFQXS84n8VU8Fh7O8hfXlkXe4WQCpxBWi4HpcyMqe4J3spVztjbmLl0HT uV/20c0flfwVRaMAU4dYIbVOZMpgYKvRjFuXNv0CRfD/NiI7/MbsDck0NwOUVewYl0P1tj oTpVDdj7E8D380MXkz4k+2ueal2H1p/RJ2X8Z0TpLBH+vvdjhisS1B6FxB9e0NFbSkwrMu ozjJNpeek9D3Dgv0VPzk+4pLCggWE/d9yf3bYmPenkzh4sqBy9EEcdF1OXNTeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4MtMcH19kQzqDl; Thu, 20 Oct 2022 09:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 29K9OFbR066811; Thu, 20 Oct 2022 09:24:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 29K9OFU4066810; Thu, 20 Oct 2022 09:24:15 GMT (envelope-from git) Date: Thu, 20 Oct 2022 09:24:15 GMT Message-Id: <202210200924.29K9OFU4066810@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Daniel Engberg Subject: git: e74014c897b3 - main - net/rsplib: Fix build with -DNDEBUG defined List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: diizzy X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e74014c897b3de44a201b304b24b2b36bcda8e0c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1666257855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bqZRq40oPaMw20tyqibWKQQRKJt3z43PhxPSaKwLZwU=; b=osz+GG59/FTHfXXzhdNnSMKJuI8XIo42sU2Pehn+lGCLbhof/8A9o9SRIIjSCmhpwyU+R6 sL8KNQO0Y2WyztHZrRZJIm8P+5Gwxtu20NEq7ReAslfv8WmbSma79dXkfvww21dmXymCPU hsP520v9gPPtGFFMrAvC6tTPfRZGoFaUz+WGQ0awIsz0Oo3LBlc5I8ybrz/NSiqWuFDAje qyMcweslcDzuXoaM0gD0YVmSYB1Mz/lxH22GHEuminvUCMFOXfZO44qtPpF7Zn1duZJIEO TVZ5K8hXMKItN6gUdA1cgWY2Oh58+UOgESapTP1fTo74NcVguDswF+aG8xa+eQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1666257855; a=rsa-sha256; cv=none; b=XE1ESreQCREy6S3EuDLDxdhl/6bAN4MBObKSwWIaP4xKaTnTtXsMH0XYPFM5A/pX5Y/8Kl 62bbLwvaDtYXoUPw7p/wAM2bp2Zhcq8FERmzCTipMnNA8SP+Ox4oDzDZ3m4Qp/H4R+Fiiz yZEvWTwAUUwRjQ7UYKevlr7E6LxEA9SucOKBDzvPtflquVxhbK/qzMEj7gbX5HSvdXcGDI 4YTNslzl+q77zzrqLhHHi9RMqHTEmfucNMFTUWTijWjgytwYjLPxYrwLtKfLC04X8tzYWP n5oELcGAjLT1AFAukjYvLY4BOa1dSrApz+KP9WpMusUNqAa/0/sHhaH1M13wxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by diizzy: URL: https://cgit.FreeBSD.org/ports/commit/?id=e74014c897b3de44a201b304b24b2b36bcda8e0c commit e74014c897b3de44a201b304b24b2b36bcda8e0c Author: Daniel Engberg AuthorDate: 2022-10-20 09:12:37 +0000 Commit: Daniel Engberg CommitDate: 2022-10-20 09:24:09 +0000 net/rsplib: Fix build with -DNDEBUG defined Disable usage of OMNeT++ random generator when -DNDEBUG is defined PR: 266721 Reported by: antoine (via exp-run) Approved by: portmgr (build fix) --- net/rsplib/files/patch-src_randomizer.c | 47 +++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/net/rsplib/files/patch-src_randomizer.c b/net/rsplib/files/patch-src_randomizer.c new file mode 100644 index 000000000000..667c7c707bdd --- /dev/null +++ b/net/rsplib/files/patch-src_randomizer.c @@ -0,0 +1,47 @@ +--- src/randomizer.c.orig 2021-02-17 14:14:20 UTC ++++ src/randomizer.c +@@ -32,13 +32,12 @@ + #include + #include + +- ++/* + #ifdef NDEBUG + #undef min + #undef max + #include + #else +-/* + It is tried to use /dev/urandom as random source first, since + it provides high-quality random numbers. If /dev/urandom is not + available, use the clib's random() function with a seed given +@@ -56,7 +55,6 @@ + + static int RandomSource = RS_TRY_DEVICE; + static FILE* RandomDevice = NULL; +-#endif + + + +@@ -84,11 +82,13 @@ uint64_t random64() + /* ###### Get 32-bit random value ######################################## */ + uint32_t random32() + { ++/* + #ifdef NDEBUG + #warning Using OMNeT++ random generator instead of time-seeded one! + const double value = uniform(0.0, (double)0xffffffff); + return((uint32_t)rint(value)); + #else ++*/ + uint32_t number; + + switch(RandomSource) { +@@ -116,7 +116,6 @@ uint32_t random32() + break; + } + return(random()); +-#endif + } + +