-
-
Notifications
You must be signed in to change notification settings - Fork 7k
examples: fix two build issues surfaced with WinCE #18843
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixing ancient gcc error: ``` docs/examples/http2-upload.c:43:8: error: "_MSC_VER" is not defined ``` Ref: https://github.com/curl/curl/actions/runs/18238150607/job/51935502616
```
In file included from docs/examples/synctime.c:96:
include/curl/curl.h:141: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'curl_socket_t'
include/curl/curl.h:425: error: expected declaration specifiers or '...' before 'curl_socket_t'
include/curl/curl.h:435: error: field 'addr' has incomplete type
include/curl/curl.h:439: error: expected declaration specifiers or '...' before '*' token
cc1: warnings being treated as errors
include/curl/curl.h:441: error: type defaults to 'int' in declaration of 'curl_socket_t'
include/curl/curl.h:441: error: 'curl_socket_t' declared as function returning a function
include/curl/curl.h:441: error: function declaration isn't a prototype
In file included from include/curl/curl.h:3322,
from docs/examples/synctime.c:96:
include/curl/multi.h:115: error: field 'fd' declared as a function
include/curl/multi.h:159: error: expected declaration specifiers or '...' before 'fd_set'
include/curl/multi.h:160: error: expected declaration specifiers or '...' before 'fd_set'
include/curl/multi.h:161: error: expected declaration specifiers or '...' before 'fd_set'
In file included from include/curl/curl.h:3334,
from docs/examples/synctime.c:96:
include/curl/typecheck-gcc.h:773: error: 'Wcurl_opensocket_callback1' declared as function returning a function
include/curl/typecheck-gcc.h:775: error: 'Wcurl_opensocket_callback2' declared as function returning a function
include/curl/typecheck-gcc.h:777: error: 'Wcurl_opensocket_callback3' declared as function returning a function
include/curl/typecheck-gcc.h:779: error: 'Wcurl_opensocket_callback4' declared as function returning a function
docs/examples/synctime.c: In function 'SyncTime_CURL_Init':
docs/examples/synctime.c:197: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:197: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:197: error: expected expression before '||' token
docs/examples/synctime.c:197: error: expected statement before ')' token
docs/examples/synctime.c:197: error: expected statement before ')' token
docs/examples/synctime.c:200: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:200: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:200: error: expected expression before '||' token
docs/examples/synctime.c:200: error: expected statement before ')' token
docs/examples/synctime.c:200: error: expected statement before ')' token
docs/examples/synctime.c:202: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:202: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:202: error: expected expression before '||' token
docs/examples/synctime.c:202: error: expected statement before ')' token
docs/examples/synctime.c:202: error: expected statement before ')' token
docs/examples/synctime.c:203: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:203: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:203: error: expected expression before '||' token
docs/examples/synctime.c:203: error: expected statement before ')' token
docs/examples/synctime.c:203: error: expected statement before ')' token
docs/examples/synctime.c:204: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:204: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:204: error: expected expression before '||' token
docs/examples/synctime.c:204: error: expected statement before ')' token
docs/examples/synctime.c:204: error: expected statement before ')' token
docs/examples/synctime.c: In function 'SyncTime_CURL_Fetch':
docs/examples/synctime.c:215: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:215: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:215: error: expected expression before '||' token
docs/examples/synctime.c:215: error: expected statement before ')' token
docs/examples/synctime.c:215: error: expected statement before ')' token
docs/examples/synctime.c:218: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:218: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:218: error: expected expression before '||' token
docs/examples/synctime.c:218: error: expected statement before ')' token
docs/examples/synctime.c:218: error: expected statement before ')' token
docs/examples/synctime.c:221: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:221: error: expected specifier-qualifier-list before 'curl_opensocket_callback'
docs/examples/synctime.c:221: error: expected expression before '||' token
docs/examples/synctime.c:221: error: expected statement before ')' token
docs/examples/synctime.c:221: error: expected statement before ')' token
```
Ref: https://github.com/curl/curl/actions/runs/18238383487/job/51936130514?pr=18039#step:12:124
vszakats
added a commit
to vszakats/curl
that referenced
this pull request
Oct 10, 2025
- include `windows.h` after `winsock2.h` via `curl/curl.h`. - avoid `errno` for WinCE. - avoid `_vscprintf` for WinCE. Ref: 4535532 curl#18843 Follow-up to 0780de2 curl#18668 Closes curl#19016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Both may apply to rare non-WinCE Windows builds too.
fix gcc 4.4.0 preprocessor error:
Ref: https://github.com/curl/curl/actions/runs/18238150607/job/51935502616
fix wrong header order:
Inlcude
windows.hafterwinsock2.hviacurl/curl.h.Regressions from 45438c8 #18823