unix: add loongarch support (#4054)

Signed-off-by: liuxiang <liuxiang@loongson.cn>
This commit is contained in:
liuxiang88 2023-06-16 16:25:25 +08:00 committed by GitHub
parent 2f1614b128
commit 7ada448d18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -417,6 +417,8 @@ typedef struct {
# define UV_FS_O_DIRECT 0x04000
#elif defined(__linux__) && defined(__x86_64__)
# define UV_FS_O_DIRECT 0x04000
#elif defined(__linux__) && defined(__loongarch__)
# define UV_FS_O_DIRECT 0x04000
#elif defined(O_DIRECT)
# define UV_FS_O_DIRECT O_DIRECT
#else

View File

@ -1615,6 +1615,8 @@ int uv_cpu_info(uv_cpu_info_t** ci, int* count) {
static const char model_marker[] = "CPU part\t: ";
#elif defined(__mips__)
static const char model_marker[] = "cpu model\t\t: ";
#elif defined(__loongarch__)
static const char model_marker[] = "cpu family\t\t: ";
#else
static const char model_marker[] = "model name\t: ";
#endif