]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
BUILD: http: properly mark some struct as extern
authorWilly Tarreau <w@1wt.eu>
Fri, 29 Mar 2019 16:52:50 +0000 (17:52 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 29 Mar 2019 20:00:22 +0000 (21:00 +0100)
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.

include/common/http.h

index 66acfd32dae2f2515cc49608a8be79017d27bc3a..2f7486ea4bf735a74d5b88ad5491ca948909f606 100644 (file)
@@ -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;