• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/motion/0002-Rename-base64_encode.patch
Fabrice FontaineFabrice Fontaine committed 5349756f70f30 Oct 2016
Raw file
Source viewDiff to previous
 
1
From 0da5428bdfe67eb17ee03f22f68e66b044abdf70 Mon Sep 17 00:00:00 2001
2
From: Fabrice Fontaine <fabrice.fontaine@orange.com>
3
Date: Sun, 30 Oct 2016 19:30:46 +0100
4
Subject: [PATCH] Rename base64_encode
5
​
6
base64_encode is already defined in gnutls so rename it as
7
motion_base64_encode to prevent a definition clash when linking
8
statically with gnutls
9
​
10
Fixes:
11
  - http://autobuild.buildroot.org/results/592672b8826f4c731c50d29725da964d876573c4
12
​
13
Applied upstream:
14
  - https://github.com/Motion-Project/motion/commit/cc3c25527d4bada0fe98a734fa2df29f8d6cf1ad
15
​
16
Signed-off-by: Fabrice Fontaine <fabrice.fontaine@orange.com>
17
---
18
 netcam.c      | 4 ++--
19
 netcam_wget.c | 4 ++--
20
 netcam_wget.h | 2 +-
21
 stream.c      | 4 ++--
22
 webhttpd.c    | 4 ++--
23
 5 files changed, 9 insertions(+), 9 deletions(-)
24
​
25
diff --git a/netcam.c b/netcam.c
26
index a9df33a..38d4ca3 100644
27
--- a/netcam.c
28
+++ b/netcam.c
29
@@ -2019,7 +2019,7 @@ static int netcam_http_build_url(netcam_context_ptr netcam, struct url_t *url)
30
     else
31
         ptr = url->userpass;
32
 
33
-    /* base64_encode needs up to 3 additional chars. */
34
+    /* motion_base64_encode needs up to 3 additional chars. */
35
     if (ptr) {
36
         userpass = mymalloc(strlen(ptr) + 3);
37
         strcpy(userpass, ptr);
38
@@ -2045,7 +2045,7 @@ static int netcam_http_build_url(netcam_context_ptr netcam, struct url_t *url)
39
         /* Allocate space for the base64-encoded string. */
40
         encuserpass = mymalloc(BASE64_LENGTH(strlen(userpass)) + 1);
41
         /* Fill in the value. */
42
-        base64_encode(userpass, encuserpass, strlen(userpass));
43
+        motion_base64_encode(userpass, encuserpass, strlen(userpass));
44
         /* Now create the last part (authorization) of the request. */
45
         request_pass = mymalloc(strlen(connect_auth_req) +
46
                                 strlen(encuserpass) + 1);
47
diff --git a/netcam_wget.c b/netcam_wget.c
48
index 4491760..f5c1dc2 100644
49
--- a/netcam_wget.c
50
+++ b/netcam_wget.c
51
@@ -210,13 +210,13 @@ int skip_lws(const char *string)
52
 
53
 
54
 /**
55
- * base64_encode
56
+ * motion_base64_encode
57
  *
58
  *   Encode the string S of length LENGTH to base64 format and place it
59
  *   to STORE.  STORE will be 0-terminated, and must point to a writable
60
  *   buffer of at least 1+BASE64_LENGTH(length) bytes.  
61
  */
62
-void base64_encode(const char *s, char *store, int length)
63
+void motion_base64_encode(const char *s, char *store, int length)
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.