Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/coreclr/pal/src/thread/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1330,10 +1330,9 @@ CorUnix::GetThreadTimesInternal(
CPalThread *pThread;
CPalThread *pTargetThread;
IPalObject *pobjThread = NULL;
clockid_t cid;
#ifdef __sun
int fd;
#else // __sun
clockid_t cid;
#endif // __sun

pThread = InternalGetCurrentThread();
Expand Down
1 change: 1 addition & 0 deletions src/native/libs/Common/pal_config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#cmakedefine01 HAVE_MNTINFO
#cmakedefine01 HAVE_STATFS_FSTYPENAME
#cmakedefine01 HAVE_STATVFS_FSTYPENAME
#cmakedefine01 HAVE_STATVFS_BASETYPE
#cmakedefine01 HAVE_NON_LEGACY_STATFS
#cmakedefine01 HAVE_STRCPY_S
#cmakedefine01 HAVE_STRLCPY
Expand Down
8 changes: 8 additions & 0 deletions src/native/libs/System.Native/pal_mount.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,14 @@ SystemNative_GetFileSystemTypeNameForMountPoint(const char* name, char* formatNa
}
SafeStringCopy(formatNameBuffer, Int32ToSizeT(bufferLength), stats.f_fstypename);
*formatType = -1;
#elif HAVE_STATVFS_BASETYPE
if (bufferLength < _FSTYPSZ) // SunOS
{
errno = ERANGE;
result = -1;
}
SafeStringCopy(formatNameBuffer, Int32ToSizeT(bufferLength), stats.f_basetype);
*formatType = -1;
#else
SafeStringCopy(formatNameBuffer, Int32ToSizeT(bufferLength), "");
*formatType = (int64_t)(stats.f_type);
Expand Down
6 changes: 6 additions & 0 deletions src/native/libs/configure.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -324,6 +324,12 @@ check_struct_has_member(
"sys/mount.h"
HAVE_STATVFS_FSTYPENAME)

check_struct_has_member(
"struct statvfs"
f_basetype
"sys/statvfs.h"
HAVE_STATVFS_BASETYPE)

set(CMAKE_EXTRA_INCLUDE_FILES dirent.h)

# statfs: Find whether this struct exists
Expand Down
1 change: 1 addition & 0 deletions src/native/minipal/debugger.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <sys/proc.h>
#define MINIPAL_DEBUGGER_PRESENT_CHECK
#elif defined(__sun)
#include <stdio.h>
#include <fcntl.h>
#include <procfs.h>
#include <errno.h>
Expand Down
2 changes: 2 additions & 0 deletions src/native/minipal/thread.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ static inline size_t minipal_get_current_thread_id(void)
tid = (size_t)_lwp_self();
#elif defined(__HAIKU__)
tid = (size_t)find_thread(NULL);
#elif defined(__sun)
tid = (size_t)pthread_self();
#else
tid = (size_t)(void*)pthread_self();
#endif
Expand Down
Loading