blinksh / blinksh/openssh-apple

Conflicting types for snprintf and vnsprintf on MacOSX build

Open
#2 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
3
Forks
1
PR merge metrics
No merged PRs in 30d

Description

When building under latest macOS, the build on MacOSX platform will fail with the following error. It looks like there were some changes and the `configure` test is not detecting this properly. For the time being we have disabled MacOSX versions of the library as we don't need them for our use case. We should probably start by updating the library itself as a lot may have changed in upstream itself. This looks like a deprecation that is now hitting our way. Other ideas for fixes: https://stackoverflow.com/questions/68203667/c-compiler-error-expected-parameter-declarator

```
bsd-snprintf.c:862:1: error: expected parameter declarator
vsnprintf (char *str, size_t count, const char *fmt, va_list args)
^
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.5.sdk/usr/include/secure/_stdio.h:75:40: note: expanded from macro 'vsnprintf'
__builtin___vsnprintf_chk (str, len, 0, __darwin_obsz(str), format, ap)
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the MacOSX build failure with the current SDK and inspect bsd-snprintf.c around the vsnprintf definition alongside the configure test. Check how the SDK macro expansion conflicts with the library and whether the bundled library needs updating. Done means the MacOSX library versions build successfully without the conflicting snprintf and vsnprintf types.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, macos
Domain
build-system, operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.