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

issue in postData to support 32bit #199

Closed
hai22yu23 opened this issue Jul 28, 2023 · 2 comments · Fixed by #200
Closed

issue in postData to support 32bit #199

hai22yu23 opened this issue Jul 28, 2023 · 2 comments · Fixed by #200

Comments

@hai22yu23
Copy link
Contributor

postData in apiClient.c has issues for supporting 32bit:

/* it should add type cast (curl_off_t)

curl_easy_setopt(handle, CURLOPT_POSTFIELDSIZE_LARGE,
(curl_off_t) strlen (bodyParameters));

  • * libcurl API curl_easy_setopt requires the third parameter
    
  • * has to be passed with correct type depending on specific option.
    
  • * For CURLOPT_POSTFIELDSIZE_LARGE option,
    
  • * it has to be type curl_off_t which is expected to be
    
  • * 64bit whether on 32bit or 64bit platform.
    
@brendandburns
Copy link
Contributor

brendandburns commented Jul 28, 2023

This needs to be fixed in the upstream OpenAPI generator:

https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/C-libcurl/apiClient.c.mustache#L238

Here is an example PR that you can use as a model:
OpenAPITools/openapi-generator#14332

Once that is fixed in the generator, we can regenerate the client.

@ityuhui
Copy link
Member

ityuhui commented Aug 4, 2023

The upstream PR OpenAPITools/openapi-generator#16238 is merged. I'd like to regenerate the client now.

Reference: https://github.com/kubernetes-client/c/blob/master/docs/how-to-regenerate-the-c-client.md#regenerate-with-openapi-generator

The project also has a GitHub Action that automatically generates the client library: https://github.com/kubernetes-client/c/actions/workflows/generate.yml that requires maintainer permission to trigger.

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 a pull request may close this issue.

3 participants