Skip to content

Commit 00760eb

Browse files
committed
fix
1 parent 5017521 commit 00760eb

File tree

5 files changed

+16
-6
lines changed

5 files changed

+16
-6
lines changed

include/fast_io_freestanding_impl/transcoders/transcoder_file.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ class basic_transcoder_file : public transcoder_io_observer
234234
other.transhandle = nullptr;
235235
return *this;
236236
}
237-
inline constexpr void close() noexcept
237+
inline constexpr void close()
238238
{
239239
this->transhandle->destroy();
240240
this->transhandle = nullptr;

include/fast_io_hosted/platforms/posix.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,15 @@
6262
namespace fast_io
6363
{
6464

65+
namespace posix
66+
{
67+
#if defined(__DARWIN_C_LEVEL) || defined(__MSDOS__)
68+
extern int libc_ioctl(int fd, unsigned long request, ...) noexcept __asm__("_ioctl");
69+
#else
70+
extern int libc_ioctl(int fd, unsigned long request, ...) noexcept __asm__("ioctl");
71+
#endif
72+
} // namespace posix
73+
6574
enum class posix_family
6675
{
6776
api,

include/fast_io_hosted/platforms/posix_mapping.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ class posix_memory_map_file
291291
{
292292
return address_begin[pos];
293293
}
294-
inline void close() noexcept
294+
inline void close()
295295
{
296296
if (this->address_begin != MAP_FAILED) [[likely]]
297297
{

include/fast_io_hosted/platforms/win32.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1234,7 +1234,7 @@ class win32_9xa_dir_io_observer
12341234
{
12351235
return handle;
12361236
}
1237-
inline explicit operator bool() const noexcept
1237+
inline explicit constexpr operator bool() const noexcept
12381238
{
12391239
return !handle.path.empty();
12401240
}
@@ -1244,6 +1244,7 @@ class win32_9xa_dir_io_observer
12441244
return temp;
12451245
}
12461246
};
1247+
12471248
inline constexpr bool operator==(win32_9xa_dir_io_observer const &a,
12481249
win32_9xa_dir_io_observer const &b) noexcept
12491250
{
@@ -1310,11 +1311,11 @@ class win32_9xa_dir_file : public win32_9xa_dir_io_observer
13101311
}
13111312
this->handle = ::std::move(newhandle);
13121313
}
1313-
inline void close() noexcept
1314+
inline void close()
13141315
{
13151316
if (*this) [[likely]]
13161317
{
1317-
::fast_io::win32::details::close_win32_9xa_dir_handle(this->handle);
1318+
::fast_io::win32::details::close_win32_9xa_dir_handle<true>(this->handle);
13181319
}
13191320
}
13201321

include/fast_io_hosted/white_hole/white_hole.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ inline int my_random_entropy(int fd) noexcept
4949
return 0;
5050
}
5151
#else
52-
if (::fast_io::posix::ioctl(fd, RNDGETENTCNT, __builtin_addressof(ent)) != 0)
52+
if (::fast_io::posix::libc_ioctl(fd, RNDGETENTCNT, __builtin_addressof(ent)) != 0)
5353
{
5454
return 0;
5555
}

0 commit comments

Comments
 (0)