mirror of
https://github.com/curl/curl.git
synced 2026-07-16 05:57:16 +03:00
examples: fix two build issues surfaced with WinCE
Both may apply to rare non-WinCE Windows builds too.
- fix gcc 4.4.0 preprocessor 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
- fix wrong header order:
Inlcude `windows.h` after `winsock2.h` via `curl/curl.h`.
Regressions from 45438c8d6f #18823
Closes #18843
This commit is contained in:
parent
ed1e72143a
commit
4535532ed3
2 changed files with 6 additions and 3 deletions
|
|
@ -40,8 +40,6 @@
|
|||
#ifndef _MSC_VER
|
||||
#include <sys/time.h>
|
||||
#include <unistd.h>
|
||||
#elif (_MSC_VER < 1900)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
@ -52,6 +50,10 @@
|
|||
#define fileno _fileno
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
||||
/* curl stuff */
|
||||
#include <curl/curl.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -90,11 +90,12 @@ int main(void) { printf("Platform not supported.\n"); return 1; }
|
|||
int main(void) { printf("Platform not supported.\n"); return 1; }
|
||||
#else
|
||||
|
||||
#include <windows.h>
|
||||
#include <time.h>
|
||||
|
||||
#include <curl/curl.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER < 1900)
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue