Skip to content
This repository was archived by the owner on Jun 18, 2023. It is now read-only.

Commit a2301ed

Browse files
author
Martin Larralde
committed
Fix missing #[cfg_attr(...)] in ::kernel
1 parent f6a21a2 commit a2301ed

File tree

5 files changed

+19
-5
lines changed

5 files changed

+19
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
## [Unreleased]
99

10+
### Fixed
11+
- Fix missing `#[cfg_attr(...]` in `psp_sys::kernel`
12+
1013
## [v0.2.1] - 2018-09-12
1114
### Added
1215
- `dox` feature to disable linking to `vitasdk` stubs during compilation (use in `docs.rs`)
1316

1417
### Fixed
15-
1618
- Links in `CHANGELOG.md` file.
1719

1820

src/kernel/processmgr.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#[link(kind = "static", name = "SceLibKernel_stub")]
1+
#[cfg_attr(
2+
not(feature = "dox"),
3+
link(kind = "static", name = "SceLibKernel_stub")
4+
)]
25
extern "C" {
36
pub fn sceKernelExitProcess(res: i32) -> i32;
47
}

src/kernel/rng.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
#[link(kind = "static", name = "SceLibKernel_stub")]
1+
#[cfg_attr(
2+
not(feature = "dox"),
3+
link(kind = "static", name = "SceLibKernel_stub")
4+
)]
25
extern "C" {
36
pub fn sceKernelGetRandomNumber(output: *mut ::void, size: u32);
47
}

src/kernel/sysmem.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,10 @@ pub enum SceKernelMemoryType {
6363
SCE_KERNEL_MEMORY_TYPE_NORMAL = 0xD0,
6464
}
6565

66-
#[link(kind = "static", name = "SceLibKernel_stub")]
66+
#[cfg_attr(
67+
not(feature = "dox"),
68+
link(kind = "static", name = "SceLibKernel_stub")
69+
)]
6770
extern "C" {
6871
pub fn sceKernelAllocMemBlock(
6972
name: *const u8,

src/kernel/threadmgr.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,10 @@ pub struct SceKernelSemaInfo {
110110
pub numWaitThreads: i32,
111111
}
112112

113-
#[link(kind = "static", name = "SceLibKernel_stub")]
113+
#[cfg_attr(
114+
not(feature = "dox"),
115+
link(kind = "static", name = "SceLibKernel_stub")
116+
)]
114117
extern "C" {
115118

116119
// Mutexes

0 commit comments

Comments
 (0)