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

Commit

Permalink
Fix missing #[cfg_attr(...)] in ::kernel
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Larralde committed Sep 12, 2018
1 parent f6a21a2 commit a2301ed
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Fixed
- Fix missing `#[cfg_attr(...]` in `psp_sys::kernel`

## [v0.2.1] - 2018-09-12
### Added
- `dox` feature to disable linking to `vitasdk` stubs during compilation (use in `docs.rs`)

### Fixed

- Links in `CHANGELOG.md` file.


Expand Down
5 changes: 4 additions & 1 deletion src/kernel/processmgr.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#[link(kind = "static", name = "SceLibKernel_stub")]
#[cfg_attr(
not(feature = "dox"),
link(kind = "static", name = "SceLibKernel_stub")
)]
extern "C" {
pub fn sceKernelExitProcess(res: i32) -> i32;
}
5 changes: 4 additions & 1 deletion src/kernel/rng.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#[link(kind = "static", name = "SceLibKernel_stub")]
#[cfg_attr(
not(feature = "dox"),
link(kind = "static", name = "SceLibKernel_stub")
)]
extern "C" {
pub fn sceKernelGetRandomNumber(output: *mut ::void, size: u32);
}
5 changes: 4 additions & 1 deletion src/kernel/sysmem.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,10 @@ pub enum SceKernelMemoryType {
SCE_KERNEL_MEMORY_TYPE_NORMAL = 0xD0,
}

#[link(kind = "static", name = "SceLibKernel_stub")]
#[cfg_attr(
not(feature = "dox"),
link(kind = "static", name = "SceLibKernel_stub")
)]
extern "C" {
pub fn sceKernelAllocMemBlock(
name: *const u8,
Expand Down
5 changes: 4 additions & 1 deletion src/kernel/threadmgr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,10 @@ pub struct SceKernelSemaInfo {
pub numWaitThreads: i32,
}

#[link(kind = "static", name = "SceLibKernel_stub")]
#[cfg_attr(
not(feature = "dox"),
link(kind = "static", name = "SceLibKernel_stub")
)]
extern "C" {

// Mutexes
Expand Down

0 comments on commit a2301ed

Please # to comment.