Skip to content

Fix macOS build: skip strdup fallback on Apple platforms#1

Open
Xinze-Li-Moqian wants to merge 1 commit into
marcellop71:mainfrom
Xinze-Li-Moqian:fix/macos-strdup
Open

Fix macOS build: skip strdup fallback on Apple platforms#1
Xinze-Li-Moqian wants to merge 1 commit into
marcellop71:mainfrom
Xinze-Li-Moqian:fix/macos-strdup

Conversation

@Xinze-Li-Moqian
Copy link
Copy Markdown

macOS declares strdup in <string.h>, so the static char* strdup() fallback in arrow_schema.c causes a compilation error:

error: static declaration of 'strdup' follows non-static declaration

This adds an !defined(__APPLE__) guard so the fallback is only compiled on platforms that don't already provide strdup. No change in behavior on Linux.

macOS declares strdup in <string.h>, so the static fallback definition
causes a compilation error. Guard it with !defined(__APPLE__) to skip
the fallback on platforms that already provide it.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant