瀏覽代碼

Learn how DllImport works before making changes

Cody Robibero 3 年之前
父節點
當前提交
ac33adf219
共有 1 個文件被更改,包括 4 次插入2 次删除
  1. 4 2
      Jellyfin.Server/Program.cs

+ 4 - 2
Jellyfin.Server/Program.cs

@@ -687,10 +687,12 @@ namespace Jellyfin.Server
 
 
             if (!string.IsNullOrEmpty(socketPerms))
             if (!string.IsNullOrEmpty(socketPerms))
             {
             {
+                #pragma warning disable SA1300 // Entrypoint is case sensitive.
                 [DllImport("libc")]
                 [DllImport("libc")]
-                static extern int Chmod(string pathname, int mode);
+                static extern int chmod(string pathname, int mode);
+                #pragma warning restore SA1300
 
 
-                var exitCode = Chmod(socketPath, Convert.ToInt32(socketPerms, 8));
+                var exitCode = chmod(socketPath, Convert.ToInt32(socketPerms, 8));
 
 
                 if (exitCode < 0)
                 if (exitCode < 0)
                 {
                 {