Skip to content

Commit

Permalink
Fix some build issues from previous commit for dotnet#77835
Browse files Browse the repository at this point in the history
• I missed setting StringMarshalling on the LibraryImport
• I missed partial on the CopyFile method implementations
  • Loading branch information
hamarb123 committed Dec 5, 2022
1 parent a373c59 commit f21a5ae
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/libraries/Common/src/Interop/OSX/Interop.libc.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ internal static unsafe int fsetattrlist(SafeHandle handle, AttrList* attrList, v
}
}

[LibraryImport(Libraries.libc, EntryPoint = "copyfile", SetLastError = true)]
[LibraryImport(Libraries.libc, EntryPoint = "copyfile", StringMarshalling = StringMarshalling.Utf8, SetLastError = true)]
internal static unsafe partial int copyfile(string from, string to, void* state, uint flags);
internal const uint COPYFILE_CLONE_FORCE = 0x02000000;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace System.IO
{
partial class FileSystem
{
public static unsafe void CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
public static unsafe partial void CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
{
//Attempt to clone the file:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ namespace System.IO
{
partial class FileSystem
{
public static void CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
public static partial void CopyFile(string sourceFullPath, string destFullPath, bool overwrite)
{
//Start the file copy and prepare for finalization
using StartedCopyFileState startedCopyFile = StartCopyFile(sourceFullPath, destFullPath, overwrite);
Expand Down

0 comments on commit f21a5ae

Please sign in to comment.