Index: head/lib/libsysdecode/errno.c =================================================================== --- head/lib/libsysdecode/errno.c +++ head/lib/libsysdecode/errno.c @@ -58,7 +58,6 @@ }; #endif -#if defined(__aarch64__) || defined(__amd64__) #include static const int cloudabi_errno_table[] = { @@ -139,7 +138,6 @@ [CLOUDABI_EXDEV] = EXDEV, [CLOUDABI_ENOTCAPABLE] = ENOTCAPABLE, }; -#endif int sysdecode_abi_to_freebsd_errno(enum sysdecode_abi abi, int error) @@ -165,13 +163,12 @@ break; } #endif -#if defined(__aarch64__) || defined(__amd64__) + case SYSDECODE_ABI_CLOUDABI32: case SYSDECODE_ABI_CLOUDABI64: if (error >= 0 && (unsigned int)error < nitems(cloudabi_errno_table)) return (cloudabi_errno_table[error]); break; -#endif default: break; } @@ -193,7 +190,7 @@ return (bsd_to_linux_errno[error]); break; #endif -#if defined(__aarch64__) || defined(__amd64__) + case SYSDECODE_ABI_CLOUDABI32: case SYSDECODE_ABI_CLOUDABI64: { unsigned int i; @@ -203,7 +200,6 @@ } break; } -#endif default: break; } Index: head/lib/libsysdecode/syscallnames.c =================================================================== --- head/lib/libsysdecode/syscallnames.c +++ head/lib/libsysdecode/syscallnames.c @@ -63,10 +63,10 @@ #include #endif -#if defined(__amd64__) || defined(__aarch64__) static +#include +static #include -#endif const char * sysdecode_syscallname(enum sysdecode_abi abi, unsigned int code) @@ -95,12 +95,14 @@ return (linux32_syscallnames[code]); break; #endif -#if defined(__amd64__) || defined(__aarch64__) + case SYSDECODE_ABI_CLOUDABI32: + if (code < nitems(cloudabi32_syscallnames)) + return (cloudabi32_syscallnames[code]); + break; case SYSDECODE_ABI_CLOUDABI64: if (code < nitems(cloudabi64_syscallnames)) return (cloudabi64_syscallnames[code]); break; -#endif default: break; } Index: head/lib/libsysdecode/sysdecode.h =================================================================== --- head/lib/libsysdecode/sysdecode.h +++ head/lib/libsysdecode/sysdecode.h @@ -35,7 +35,8 @@ SYSDECODE_ABI_FREEBSD32, SYSDECODE_ABI_LINUX, SYSDECODE_ABI_LINUX32, - SYSDECODE_ABI_CLOUDABI64 + SYSDECODE_ABI_CLOUDABI64, + SYSDECODE_ABI_CLOUDABI32 }; int sysdecode_abi_to_freebsd_errno(enum sysdecode_abi _abi, int _error); Index: head/lib/libsysdecode/sysdecode.3 =================================================================== --- head/lib/libsysdecode/sysdecode.3 +++ head/lib/libsysdecode/sysdecode.3 @@ -25,7 +25,7 @@ .\" .\" $FreeBSD$ .\" -.Dd November 24, 2017 +.Dd December 16, 2017 .Dt SYSDECODE 3 .Os .Sh NAME @@ -61,9 +61,12 @@ .It Li SYSDECODE_ABI_LINUX32 32-bit Linux binaries. Supported on amd64. +.It Li SYSDECODE_ABI_CLOUDABI32 +32-bit CloudABI binaries. +Supported on all platforms. .It Li SYSDECODE_ABI_CLOUDABI64 64-bit CloudABI binaries. -Supported on aarch64 and amd64. +Supported on all platforms. .It Li SYSDECODE_ABI_UNKNOWN A placeholder for use when the ABI is not known. .El