From: Felix Fietkau Date: Sat, 22 Mar 2014 17:31:41 +0000 (+0100) Subject: make uclient_backend_http visible to allow the client to test for it X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=95fa6036384f116a2cc1e9f1298bea57ef81d611;p=oweals%2Fuclient.git make uclient_backend_http visible to allow the client to test for it the struct is still opaque, it is only used for pointer tests Signed-off-by: Felix Fietkau --- diff --git a/uclient-backend.h b/uclient-backend.h index 5022715..47de675 100644 --- a/uclient-backend.h +++ b/uclient-backend.h @@ -28,7 +28,6 @@ struct uclient_url { const char *auth; }; -extern const struct uclient_backend uclient_backend_http; void uclient_backend_set_eof(struct uclient *cl); void uclient_backend_reset_state(struct uclient *cl); diff --git a/uclient-http.c b/uclient-http.c index ef44a40..b6f28e1 100644 --- a/uclient-http.c +++ b/uclient-http.c @@ -850,7 +850,7 @@ uclient_http_read(struct uclient *cl, char *buf, unsigned int len) return len; } -const struct uclient_backend uclient_backend_http __hidden = { +const struct uclient_backend uclient_backend_http = { .prefix = uclient_http_prefix, .alloc = uclient_http_alloc, diff --git a/uclient.h b/uclient.h index d328b14..f4009e0 100644 --- a/uclient.h +++ b/uclient.h @@ -47,6 +47,8 @@ int uclient_write(struct uclient *cl, char *buf, int len); int uclient_request(struct uclient *cl); /* HTTP */ +extern const struct uclient_backend uclient_backend_http; + int uclient_http_set_header(struct uclient *cl, const char *name, const char *value); int uclient_http_reset_headers(struct uclient *cl, const char *name, const char *value); int uclient_http_set_request_type(struct uclient *cl, const char *type);