Open AreaZR opened 10 months ago
Thank you for trying to keep this repo up-to-date!
I just wanted to note that there are a couple errors when trying to build this branch on Android or Windows (and possibly other non-Apple platforms) due to new references to Apple-specific headers/defines:
workgroup_base.h:15:10: fatal error: 'mach/port.h' file not found
object.h:278:1: error: unknown type name 'OS_ASSUME_PTR_ABI_SINGLE_BEGIN'
And on Android there’s also this error:
In file included from /Users/me/libdispatch/src/transform.c:21:
In file included from /Users/me/libdispatch/src/internal.h:222:
In file included from /Users/me/libdispatch/os/workgroup_base.h:13:
In file included from /Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/local/include/stdlib.h:31:
In file included from /Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdlib.h:34:
In file included from /Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/malloc.h:30:
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:55:14: error: expected ';' after top level declarator
typedef off_t fpos_t;
^
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:248:25: error: unknown type name 'fpos_t'; did you mean 'fpos64_t'?
int fgetpos(FILE* __fp, fpos_t* __pos);
^
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:56:17: note: 'fpos64_t' declared here
typedef off64_t fpos64_t;
^
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:249:31: error: unknown type name 'fpos_t'; did you mean 'fpos64_t'?
int fsetpos(FILE* __fp, const fpos_t* __pos);
^
/Users/me/Library/Android/sdk/ndk/25.2.9519653/toolchains/llvm/prebuilt/darwin-x86_64/sysroot/usr/include/stdio.h:56:17: note: 'fpos64_t' declared here
typedef off64_t fpos64_t;
^
libdispatch-android-build.txt contains the full build instructions and logs for an Android build. Not sure if this is something that would have to be sorted out before a merge.
I'm working on it and looking into it!
This took a bit of work to ensure every change that happened following the last merge was preserved, but I was eventually able to do it.
This brings libdispatch on par with macOS Sonoma!