|
| 1 | +From f1139989b39b32476be655a451b950cab416c09a Mon Sep 17 00:00:00 2001 |
| 2 | +From: Martin Jansa <martin2.jansa@lgepartner.com> |
| 3 | +Date: Thu, 4 Jan 2024 14:02:03 +0100 |
| 4 | +Subject: [PATCH] account_info.rs: Fix build with rust-1.72 and newer |
| 5 | + |
| 6 | +:Release Notes: |
| 7 | +After rust upgrade in oe-core from 1.71.1 to 1.74.1 in: |
| 8 | +https://git.openembedded.org/openembedded-core/commit/?id=30637cdeb31fae02544fdc643a455d0ebb126ee6 |
| 9 | +and following commits, solana was failing to build. |
| 10 | + |
| 11 | +:Detailed Notes: |
| 12 | +Backport a fix from v1.17.0: |
| 13 | +https://github.com/solana-labs/solana/pull/32961 |
| 14 | + |
| 15 | +we need only this part: |
| 16 | +https://github.com/solana-labs/solana/commit/9e703f85de4184f577f22a1c72a0d33612f2feb1#diff-2830a98fa15197faaaf1226883e9011c9302fedb10c7926077b17c07fa320c57 |
| 17 | + |
| 18 | +for other fixes we should just upgrade solana in OSE to latest. |
| 19 | + |
| 20 | +:Testing Performed: |
| 21 | +Only build tested. |
| 22 | + |
| 23 | +:QA Notes: |
| 24 | +No change to image. |
| 25 | + |
| 26 | +:Issues Addressed: |
| 27 | +[WRP-29491] Create GPVB with Yocto 5.0 Scarthgap |
| 28 | +--- |
| 29 | +Upstream-Status: Backport [v1.17.0: https://github.com/solana-labs/solana/pull/32961] |
| 30 | + |
| 31 | + sdk/program/src/account_info.rs | 1 + |
| 32 | + 1 file changed, 1 insertion(+) |
| 33 | + |
| 34 | +diff --git a/sdk/program/src/account_info.rs b/sdk/program/src/account_info.rs |
| 35 | +index 3652e2251e..006390473b 100644 |
| 36 | +--- a/sdk/program/src/account_info.rs |
| 37 | ++++ b/sdk/program/src/account_info.rs |
| 38 | +@@ -181,6 +181,7 @@ impl<'a> AccountInfo<'a> { |
| 39 | + Ok(()) |
| 40 | + } |
| 41 | + |
| 42 | ++ #[rustversion::attr(since(1.72), allow(invalid_reference_casting))] |
| 43 | + pub fn assign(&self, new_owner: &Pubkey) { |
| 44 | + // Set the non-mut owner field |
| 45 | + unsafe { |
0 commit comments