uhttpd: Fix compilation with gcc 6.4
This commit is contained in:
@@ -419,7 +419,7 @@ void client_poll_post_data(struct client *cl)
|
|||||||
if (!d->data_send)
|
if (!d->data_send)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
cur_len = min(r->content_length, len);
|
cur_len = u_min(r->content_length, len);
|
||||||
if (cur_len) {
|
if (cur_len) {
|
||||||
if (d->data_blocked)
|
if (d->data_blocked)
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ uh_path_lookup(struct client *cl, const char *url)
|
|||||||
/* create canon path */
|
/* create canon path */
|
||||||
len = strlen(uh_buf);
|
len = strlen(uh_buf);
|
||||||
slash = len && uh_buf[len - 1] == '/';
|
slash = len && uh_buf[len - 1] == '/';
|
||||||
len = min(len, sizeof(path_phys) - 1);
|
len = u_min(len, sizeof(path_phys) - 1);
|
||||||
|
|
||||||
for (i = len; i >= 0; i--) {
|
for (i = len; i >= 0; i--) {
|
||||||
char ch = uh_buf[i];
|
char ch = uh_buf[i];
|
||||||
|
|||||||
@@ -41,8 +41,8 @@ struct uh_addr {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#define min(x, y) (((x) < (y)) ? (x) : (y))
|
#define u_min(x, y) (((x) < (y)) ? (x) : (y))
|
||||||
#define max(x, y) (((x) > (y)) ? (x) : (y))
|
#define u_max(x, y) (((x) > (y)) ? (x) : (y))
|
||||||
|
|
||||||
#define array_size(x) \
|
#define array_size(x) \
|
||||||
(sizeof(x) / sizeof(x[0]))
|
(sizeof(x) / sizeof(x[0]))
|
||||||
|
|||||||
Reference in New Issue
Block a user