Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libublksrv: Build fixes for 32-bit systems and external integration #76

Merged
merged 2 commits into from
Nov 13, 2024

Conversation

dhavale
Copy link
Contributor

@dhavale dhavale commented Nov 12, 2024

There are 2 commits in this request

  • First one wraps a defining _GNU_SOURCE under #ifndef so we avoid redefinition build errors
  • Second one fixes eventfd write() call to use uint64_t at all the places. This fixes error on 32-bit platforms where we were using 4byte wide data type.

ublksrv needs _GNU_SOURCE defined for using cpu_set_t. While
integrating with external build system like AOSP, these are defined
using CFLAGS (-D_GNU_SOURCE). This causes _GNU_SOURCE redefined build
errors so let's wrap this definition under ifndef which will preserve
original intention while making the integration easier.

Signed-off-by: Sandeep Dhavale <[email protected]>
lib/ublksrv.c Outdated Show resolved Hide resolved
@dhavale dhavale force-pushed the android_compat branch 2 times, most recently from 8cc5188 to 877b9ce Compare November 12, 2024 20:41
eventfd expects 8-bytes unsigned integer (uint64_t) for read/writes.
Instead of using native data types which can have different sizes
on 32-bit platforms, use uint64_t to make this explicit throughout.

Signed-off-by: Sandeep Dhavale <[email protected]>
@ming1 ming1 merged commit bcfde42 into ublk-org:master Nov 13, 2024
1 check passed
@dhavale dhavale deleted the android_compat branch November 14, 2024 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants