Skip to content

Commit 40f57dc

Browse files
authored
support pdisk build with musl (#13414)
1 parent 41e21f4 commit 40f57dc

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

ydb/library/pdisk_io/aio_linux.cpp

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,19 @@
1313

1414
#undef RWF_APPEND
1515

16+
#if !defined(_musl_)
1617
#include <liburing.h>
18+
#endif
1719
#include <libaio.h>
20+
#if !defined(_musl_)
1821
#include <linux/fs.h>
22+
#endif
1923
#include <sys/ioctl.h>
2024

25+
#if defined(_musl_)
26+
#define BLKDISCARD _IO(0x12,119)
27+
#endif
28+
2129
namespace NKikimr {
2230
namespace NPDisk {
2331

@@ -380,6 +388,7 @@ class TAsyncIoContextLibaio : public IAsyncIoContext {
380388
/*
381389
TAsyncIoOperationLiburing
382390
*/
391+
#if !defined(_musl_)
383392
struct TAsyncIoOperationLiburing : IAsyncIoOperation {
384393
void* Cookie = nullptr;
385394
ICallback *Callback = nullptr;
@@ -706,6 +715,7 @@ class TAsyncIoContextLiburing : public IAsyncIoContext {
706715
void OnAsyncIoOperationCompletion(IAsyncIoOperation *) override {
707716
}
708717
};
718+
#endif
709719

710720
/*
711721
CreateAsyncIoContextReal

ydb/library/pdisk_io/file_params_linux.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ static constexpr ui64 RWFAppendCheck = (ui64)RWF_APPEND;
1313
#undef RWF_APPEND
1414
#endif
1515

16+
#if !defined(_musl_)
1617
#include <linux/fs.h>
18+
#else
19+
#include <sys/mount.h>
20+
#endif
1721
#include <sys/ioctl.h>
1822
#include <sys/stat.h>
1923
#include <sys/types.h>

ydb/library/pdisk_io/wcache.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@
1111
#ifdef _linux_
1212
#include <libgen.h>
1313
#include <limits.h>
14+
#if !defined(_musl_)
1415
#include <linux/fs.h>
16+
#else
17+
#include <sys/mount.h>
18+
#endif
1519
#include <linux/nvme_ioctl.h>
1620
#include <stdlib.h>
1721
#include <sys/ioctl.h>

0 commit comments

Comments
 (0)