Skip to content

Commit

Permalink
Merge pull request #93 from dtolnay/please
Browse files Browse the repository at this point in the history
Enable zero-sized section member for openbsd
  • Loading branch information
dtolnay authored Jun 5, 2024
2 parents 16943f2 + 494ee50 commit c383e16
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
11 changes: 10 additions & 1 deletion impl/src/declaration.rs
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,16 @@ pub fn expand(input: TokenStream) -> TokenStream {
static DUPCHECK_STOP: () = ();

#used
#[cfg(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "illumos", target_os = "freebsd", target_os = "psp"))]
#[cfg(any(
target_os = "none",
target_os = "linux",
target_os = "android",
target_os = "fuchsia",
target_os = "illumos",
target_os = "freebsd",
target_os = "openbsd",
target_os = "psp",
))]
#[cfg_attr(any(target_os = "none", target_os = "linux", target_os = "android", target_os = "fuchsia", target_os = "psp"), link_section = #linux_section)]
#[cfg_attr(target_os = "illumos", link_section = #illumos_section)]
#[cfg_attr(any(target_os = "freebsd", target_os = "openbsd"), link_section = #bsd_section)]
Expand Down
1 change: 0 additions & 1 deletion tests/distributed_slice.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ fn test() {
}

#[test]
#[cfg(not(target_os = "openbsd"))]
fn test_empty() {
#[distributed_slice]
static EMPTY: [i32];
Expand Down

0 comments on commit c383e16

Please sign in to comment.