Skip to content

Commit aca6b21

Browse files
committed
Update cmake version info: cherry-pick:main
1 parent c5bca84 commit aca6b21

2 files changed

Lines changed: 13 additions & 7 deletions

File tree

libraries/API/api.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
macro(api_target NAME DEPENDENCIES)
22
project(
33
${NAME}
4-
VERSION ${API_PROJECT_VERSION}
4+
VERSION ${PROJECT_VERSION}
55
LANGUAGES CXX)
66
install(DIRECTORY include/ DESTINATION include/${NAME})
77
cmsdk2_add_library(

libraries/FsAPI/include/fs/FileObject.hpp

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -394,8 +394,7 @@ template <class Derived, typename FileType> class FileMemberAccess {
394394
#undef FSAPI_FUNCTION_GROUP
395395

396396
#define FSAPI_FUNCTION_GROUP(QUAL) \
397-
template <typename Type> \
398-
auto QUAL ioctl(int request, Type *arg = nullptr) QUAL { \
397+
template <typename Type> auto QUAL ioctl(int request, Type *arg) QUAL { \
399398
m_file.ioctl(request, arg); \
400399
return static_cast<Derived QUAL>(*this); \
401400
}
@@ -404,13 +403,20 @@ template <class Derived, typename FileType> class FileMemberAccess {
404403
FSAPI_FUNCTION_GROUP(&&)
405404
#undef FSAPI_FUNCTION_GROUP
406405

406+
#define FSAPI_FUNCTION_GROUP(QUAL) \
407+
auto QUAL ioctl(int request) QUAL { \
408+
m_file.ioctl(request); \
409+
return static_cast<Derived QUAL>(*this); \
410+
}
411+
FSAPI_FUNCTION_GROUP(const &)
412+
FSAPI_FUNCTION_GROUP(&)
413+
FSAPI_FUNCTION_GROUP(&&)
414+
#undef FSAPI_FUNCTION_GROUP
415+
407416
const FileType &file() const { return m_file; }
408417
FileType &file() { return m_file; }
409418

410-
private:
411-
// This should not be moved during move operations
412-
// the file it points to will move the fd from the temporary
413-
// to the new location and this will point to the new location
419+
protected:
414420
FileType m_file;
415421
}; // namespace fs
416422

0 commit comments

Comments
 (0)