From 0da5428bdfe67eb17ee03f22f68e66b044abdf70 Mon Sep 17 00:00:00 2001
From: Fabrice Fontaine <fabrice.fontaine@orange.com>
Date: Sun, 30 Oct 2016 19:30:46 +0100
Subject: [PATCH] Rename base64_encode
base64_encode is already defined in gnutls so rename it as
motion_base64_encode to prevent a definition clash when linking
- http://autobuild.buildroot.org/results/592672b8826f4c731c50d29725da964d876573c4
- https://github.com/Motion-Project/motion/commit/cc3c25527d4bada0fe98a734fa2df29f8d6cf1ad
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
5 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/netcam.c b/netcam.c
index a9df33a..38d4ca3 100644
@@ -2019,7 +2019,7 @@ static int netcam_http_build_url(netcam_context_ptr netcam, struct url_t *url)
- /* base64_encode needs up to 3 additional chars. */
+ /* motion_base64_encode needs up to 3 additional chars. */
userpass = mymalloc(strlen(ptr) + 3);
@@ -2045,7 +2045,7 @@ static int netcam_http_build_url(netcam_context_ptr netcam, struct url_t *url)
/* Allocate space for the base64-encoded string. */
encuserpass = mymalloc(BASE64_LENGTH(strlen(userpass)) + 1);
- base64_encode(userpass, encuserpass, strlen(userpass));
+ motion_base64_encode(userpass, encuserpass, strlen(userpass));
/* Now create the last part (authorization) of the request. */
request_pass = mymalloc(strlen(connect_auth_req) +
strlen(encuserpass) + 1);
diff --git a/netcam_wget.c b/netcam_wget.c
index 4491760..f5c1dc2 100644
@@ -210,13 +210,13 @@ int skip_lws(const char *string)
* Encode the string S of length LENGTH to base64 format and place it
* to STORE. STORE will be 0-terminated, and must point to a writable
* buffer of at least 1+BASE64_LENGTH(length) bytes.
-void base64_encode(const char *s, char *store, int length)
+void motion_base64_encode(const char *s, char *store, int length)