Skip to content
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

Ass VisionOS compatibility by adding missing type definitions #11019

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sinkingsugar
Copy link

Fix visionOS compilation errors with legacy type definitions

The visionOS SDK doesn't include several legacy Unix type definitions that are present in other Apple platforms. Fixed compilation errors by:

  • Replaced u_int with unsigned int
  • Replaced uint with unsigned int

This allows the code to compile cleanly on visionOS while maintaining compatibility with other platforms. The changes are minimal and don't affect functionality, just addressing type definitions that aren't available in the modernized visionOS SDK.

Fixes compilation errors such as:

  • unknown type name 'u_int' in sys/ucred.h
  • unknown type name 'uint' in ggml calculations

…common and ggml source files. This update includes conditional type definitions for `u_int`, `u_char`, `u_short`, and `uint` to address legacy type issues on VisionOS across multiple files: common.cpp, ggml-backend.cpp, ggml-cpu.c, ggml-cpu.cpp, and ggml-metal.m.
@github-actions github-actions bot added ggml changes relating to the ggml tensor library for machine learning Apple Metal https://en.wikipedia.org/wiki/Metal_(API) labels Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Apple Metal https://en.wikipedia.org/wiki/Metal_(API) ggml changes relating to the ggml tensor library for machine learning
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant