From: Willy Tarreau Date: Fri, 29 Mar 2019 16:52:50 +0000 (+0100) Subject: BUILD: http: properly mark some struct as extern X-Git-Tag: v2.0-dev3~366 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e01d11a75bdee817609e5e13a52236d9d4075881;p=thirdparty%2Fhaproxy.git BUILD: http: properly mark some struct as extern http_known_methods, HTTP_100 and HTTP_103 were not declared extern and as such were multiply defined since they were in http.h. There was apparently no more side effect but it may depend on the platform and the linker. This needs to be backported to 1.9. --- diff --git a/include/common/http.h b/include/common/http.h index 66acfd32da..2f7486ea4b 100644 --- a/include/common/http.h +++ b/include/common/http.h @@ -121,11 +121,11 @@ struct http_method_desc { extern const int http_err_codes[HTTP_ERR_SIZE]; extern const char *http_err_msgs[HTTP_ERR_SIZE]; extern struct buffer http_err_chunks[HTTP_ERR_SIZE]; -const struct ist http_known_methods[HTTP_METH_OTHER]; +extern const struct ist http_known_methods[HTTP_METH_OTHER]; extern const uint8_t http_char_classes[256]; -const struct ist HTTP_100; -const struct ist HTTP_103; +extern const struct ist HTTP_100; +extern const struct ist HTTP_103; extern const char *HTTP_301; extern const char *HTTP_302; extern const char *HTTP_303;