Skip to content

Commit 8cebed0

Browse files
committed
Workaround missing arc4random symbol on Linux
1 parent 8465715 commit 8cebed0

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
//===----------------------------------------------------------------------===//
2+
//
3+
// This source file is part of the Swift Binary Parsing open source project
4+
//
5+
// Copyright (c) 2025 Apple Inc. and the Swift project authors
6+
// Licensed under Apache License v2.0 with Runtime Library Exception
7+
//
8+
// See https://swift.org/LICENSE.txt for license information
9+
//
10+
//===----------------------------------------------------------------------===//
11+
12+
#if $Embedded && os(Linux)
13+
// Temporary workaround for lack of random support on embedded Linux
14+
@c func arc4random_buf(_ buf: UnsafeMutableRawPointer?, _ nbytes: Int) {}
15+
#endif

0 commit comments

Comments
 (0)