I have an application that uses mongoose as a library. After updating Xcode to 13.1 (macOS Monterey) I am getting a compile error that I can't figure out how to fix:
type 'struct ah' has incompatible definitions in different translation units
This is in a block of code within mongoose where a struct is being defined and used:
// Parsed Authorization header
struct ah {
char *user, *uri, *cnonce, *response, *qop, *nc, *nonce;
};
// Return 1 on success. Always initializes the ah structure.
static int parse_auth_header(struct mg_connection *conn, char *buf,
size_t buf_size, struct ah *ah) {
char *name, *value, *s;
const char *auth_header;
(void) memset(ah, 0, sizeof(*ah));
if ((auth_header = mg_get_header(conn, "Authorization")) == NULL ||
mg_strncasecmp(auth_header, "Digest ", 7) != 0) {
return 0;
}
I would really rather not modify the code since it's a 3rd party library that may receive updates. But at the same time I have to be able to build my app.
Is there an Xcode setting that I'm not seeing to get around this? I'm not sure what the error even means.