Skip to content

Commit 4b2b82c

Browse files
Fix code generation with multiversion feature and release v0.3.1
During rebasing of #19, the line that enables the LFS_MULTIVERSION feature flag not only for the compilation but also for the code generation somehow got lost. This patch updates the build script and prepares the bugfix release v0.3.1.
1 parent ed32886 commit 4b2b82c

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
88

99
-
1010

11+
## [0.3.1] - 2025-02-27
12+
13+
### Fixed
14+
15+
- Fix code generation with `multiversion` feature
16+
1117
## [0.3.0] - 2025-02-26
1218

1319
### Changed
@@ -45,7 +51,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
4551
[#5]: https://github.com/trussed-dev/littlefs2-sys/pull/5
4652
[#9]: https://github.com/trussed-dev/littlefs2-sys/pull/9
4753

48-
[Unreleased]: https://github.com/trussed-dev/littlefs2-sys/compare/0.3.0...HEAD
54+
[Unreleased]: https://github.com/trussed-dev/littlefs2-sys/compare/0.3.1...HEAD
4955
[0.1.7]: https://github.com/trussed-dev/littlefs2-sys/compare/0.1.6...0.1.7
5056
[0.2.0]: https://github.com/trussed-dev/littlefs2-sys/compare/0.1.7...0.2.0
5157
[0.3.0]: https://github.com/trussed-dev/littlefs2-sys/compare/0.2.0...0.3.0
58+
[0.3.1]: https://github.com/trussed-dev/littlefs2-sys/compare/0.3.0...0.3.1

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22
name = "littlefs2-sys"
33
description = "Low-level bindings to littlefs"
4-
version = "0.3.0"
4+
version = "0.3.1"
55
authors = ["Nicolas Stalder <[email protected]>", "The Trussed Developers"]
66
edition = "2018"
77
license = "BSD-3-Clause"

build.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,17 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
4848
)
4949
.expect("Failed to write lfs.h");
5050

51-
let bindings = bindgen::Builder::default()
51+
let bindgen = bindgen::Builder::default()
5252
.header(out_lfs_h.into_os_string().into_string().unwrap())
5353
.clang_arg("-std=c99")
5454
.clang_arg("-DLFS_NO_DEBUG")
5555
.clang_arg("-DLFS_NO_WARN")
56-
.clang_arg("-DLFS_NO_ERROR")
56+
.clang_arg("-DLFS_NO_ERROR");
57+
58+
#[cfg(feature = "multiversion")]
59+
let bindgen = bindgen.clang_arg("-DLFS_MULTIVERSION");
60+
61+
let bindings = bindgen
5762
.use_core()
5863
.allowlist_item("lfs_.*")
5964
.allowlist_item("LFS_.*")

0 commit comments

Comments
 (0)