curl_setup: fix missing ADDRESS_FAMILY type in rare build cases

Build failed when both `ADDRESS_FAMILY` and `sockaddr_un` stuct were
missing from the Windows SDK, with UnixSockets enabled.

Seen with GNU 4.4.0 in CeGCC 0.59.1:
```
lib/curl_setup.h:983: error: expected specifier-qualifier-list before 'ADDRESS_FAMILY'
lib/curl_setup.h:985: warning: struct has no members
```

Also reported with VS2003:
https://datagirl.xyz/posts/wolfssl_curl_w2k.html

Closes #15969
This commit is contained in:
Viktor Szakats 2025-01-10 16:58:48 +01:00
parent 7eb4ddb850
commit 81680a4070
No known key found for this signature in database
GPG key ID: B5ABD165E2AEF201

View file

@ -976,7 +976,7 @@ int getpwuid_r(uid_t uid, struct passwd *pwd, char *buf,
# define UNIX_PATH_MAX 108
/* !checksrc! disable TYPEDEFSTRUCT 1 */
typedef struct sockaddr_un {
ADDRESS_FAMILY sun_family;
CURL_SA_FAMILY_T sun_family;
char sun_path[UNIX_PATH_MAX];
} SOCKADDR_UN, *PSOCKADDR_UN;
# define WIN32_SOCKADDR_UN