-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
undeclared identifier 'max_align_t' when compiling libgit2 #111
Comments
This is quite easily reproducible with:
The problem looks like We probably need to fix |
Thanks, I tried to minimize the example by trying to include different things, but I didn't try |
Yup, or just dropping c90 (since c11 is the default). But still we need to fix the actual issue in the SDK. |
Any news on this? |
`max_align_t` is not declared in C99 mode, so use an aligned attribute and `__BIGGEST_ALIGNMENT__` instead. Fixes WebAssembly/wasi-sdk#111.
I've now submitted WebAssembly/wasi-libc#335 to fix this. |
`max_align_t` is not declared in C99 mode, so use an aligned attribute and `__BIGGEST_ALIGNMENT__` instead. Fixes WebAssembly/wasi-sdk#111.
Also, remove no longer necessary __need_STDDEF_H_misc stuff. References: WebAssembly#335 WebAssembly/wasi-sdk#111 https://github.com/llvm/llvm-project/blob/2e999b7dd1934a44d38c3a753460f1e5a217e9a5/clang/lib/Headers/stddef.h#L106-L113
Also, remove no longer necessary __need_STDDEF_H_misc stuff. References: WebAssembly#335 WebAssembly/wasi-sdk#111 https://github.com/llvm/llvm-project/blob/2e999b7dd1934a44d38c3a753460f1e5a217e9a5/clang/lib/Headers/stddef.h#L106-L113
Also, remove no longer necessary __need_STDDEF_H_misc stuff. References: #335 WebAssembly/wasi-sdk#111 https://github.com/llvm/llvm-project/blob/2e999b7dd1934a44d38c3a753460f1e5a217e9a5/clang/lib/Headers/stddef.h#L106-L113
`max_align_t` is not declared in C99 mode, so use an aligned attribute and `__BIGGEST_ALIGNMENT__` instead. Fixes WebAssembly/wasi-sdk#111.
Also, remove no longer necessary __need_STDDEF_H_misc stuff. References: WebAssembly#335 WebAssembly/wasi-sdk#111 https://github.com/llvm/llvm-project/blob/2e999b7dd1934a44d38c3a753460f1e5a217e9a5/clang/lib/Headers/stddef.h#L106-L113
I'm not sure if the issue is with wasi-sdk or libgit2. I'm not super experienced in C programming but the error message is from
wasi-sysroot/include/__struct_sockaddress_in.h
, so I'm posting it here. Any hints?(There is a port to emscripten at https://github.com/petersalomonsen/wasm-git/, but I'd like to compile it without emscripten.)
I use the following bash script to download and compile libgit2:
the output:
The text was updated successfully, but these errors were encountered: