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

IBMi build broken due to missing realpath() #16209

Closed
andrewkirillov-ibm opened this issue Feb 6, 2025 · 1 comment
Closed

IBMi build broken due to missing realpath() #16209

andrewkirillov-ibm opened this issue Feb 6, 2025 · 1 comment
Labels

Comments

@andrewkirillov-ibm
Copy link
Contributor

I did this

Compile 8.12.0 on IBM i V7R4M0 system, with SSL enabled. Got the following errors:

CZM1001:  VLS_SCACHE__819.c, 367.23: CZM0304(10) No function prototype given for "realpath".
CZM1003:  VLS_SCACHE__819.c, 367.21: CZM0196(30) Initialization between types "char*" and "int" is not allowed.
..
CZS0601:  Module VLS_SCACHE is not created because statement errors occurred.

The issue is introduced by the following commit:
fa0ccd9

Here lib/vtls/vtls_scache.c was introduced, which uses _fullpath() on Windows and realpath() on all other platforms. IBMi system header, however, do not provide realpath() or its replacement.

I expected the following

Clean build

curl/libcurl version

8.12.0

operating system

OS400 V7R4M0

@andrewkirillov-ibm
Copy link
Contributor Author

As IBMi does not provide realpath() or a replacement for it, a fix could be to change #ifdefs

From

#ifdef _WIN32
#else
#endif

to

#ifdef _WIN32
#elif !defined(__OS400__)
#endif

It will the fall back to return Curl_dyn_addf(buf, ":%s-%s", name, path); by default.

@vszakats vszakats added the build label Feb 6, 2025
bagder added a commit that referenced this issue Feb 6, 2025
And make vtls_scache use HAVE_REALPATH

Fixes #16209
Reported-by: Andrew Kirillov
@bagder bagder closed this as completed in c0d38f5 Feb 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging a pull request may close this issue.

2 participants