Skip to content

Commit c610792

Browse files
committed
fix rust/SConscript
1 parent 3beeead commit c610792

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

components/rust/SConscript

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,18 @@
22
import os
33
from building import *
44

5-
cwd = GetCurrentDir()
65
objs = []
6+
7+
def _has(sym: str) -> bool:
8+
try:
9+
return bool(GetDepend([sym]))
10+
except Exception:
11+
return bool(GetDepend(sym))
12+
13+
if not _has('RT_USING_RUST'):
14+
Return('objs')
15+
16+
cwd = GetCurrentDir()
717
entries = os.listdir(cwd)
818

919
for d in entries:

components/rust/core/src/bindings/libc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ pub const RTLD_LAZY: c_int = 0x00000; // Lazy function call binding
2222
pub const RTLD_NOW: c_int = 0x00001; // Immediate function call binding
2323
pub const RTLD_GLOBAL: c_int = 0x10000; // Make symbols globally available
2424
pub const RTLD_LOCAL: c_int = 0x00000; // Default local
25-
// fcntl.h interent constants
25+
// fcntl.h integer constants
2626
pub const O_RDONLY: c_int = 0x0000; // open for reading only
2727
pub const O_WRONLY: c_int = 0x0001; // open for writing only
2828
pub const O_RDWR: c_int = 0x0002; // open for reading and writing

components/rust/examples/application/fs/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Change Logs:
88
* Date Author notes
9-
* 2025-10-20 foxglove Rust file opration test.
9+
* 2025-10-20 foxglove Rust file operation test.
1010
* 2025-10-29 foxglove Updated to demonstrate new modular macro interface
1111
*/
1212
#![no_std]

0 commit comments

Comments
 (0)