fix: Fixes epoll calls on linux (#818)
This commit is contained in:
parent
ef761f9035
commit
f3b722b9d6
2 changed files with 5 additions and 5 deletions
|
|
@ -93,16 +93,16 @@ namespace Server.Network
|
|||
|
||||
private static class Linux
|
||||
{
|
||||
[DllImport("libc", SetLastError = true)]
|
||||
[DllImport("libc.so.6", SetLastError = true)]
|
||||
public static extern int epoll_create1(epoll_flags flags);
|
||||
|
||||
[DllImport("libc", SetLastError = true)]
|
||||
[DllImport("libc.so.6", SetLastError = true)]
|
||||
public static extern int epoll_close(int epfd);
|
||||
|
||||
[DllImport("libc", SetLastError = true)]
|
||||
[DllImport("libc.so.6", SetLastError = true)]
|
||||
public static extern int epoll_ctl(int epfd, epoll_op op, int fd, ref epoll_event ee);
|
||||
|
||||
[DllImport("libc", SetLastError = true)]
|
||||
[DllImport("libc.so.6", SetLastError = true)]
|
||||
public static extern int epoll_wait(int epfd, [In, Out] epoll_event[] ee, int maxevents, int timeout);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -380,7 +380,7 @@ namespace Server.Saves
|
|||
|
||||
private static IEnumerable<string> PathsByTimestampName(string path, bool files = false)
|
||||
{
|
||||
var allItems = files ? Directory.GetFiles(path) : Directory.GetDirectories(path);
|
||||
var allItems = files ? Directory.EnumerateFiles(path) : Directory.GetDirectories(path);
|
||||
var items = new SortedDictionary<DateTime, string>(new DescendingComparer<DateTime>());
|
||||
foreach (var item in allItems)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue