~ubuntu-branches/ubuntu/saucy/libfprint/saucy

« back to all changes in this revision

Viewing changes to debian/patches/Fix-libusb-global-variables-FTBFS.patch

  • Committer: Package Import Robot
  • Author(s): Didier Raboud
  • Date: 2012-07-09 00:46:05 UTC
  • mfrom: (2.1.11 sid)
  • Revision ID: package-import@ubuntu.com-20120709004605-5mq86aro19eieovv
Tags: 1:0.4.0-4-gdfff16f-4
Fix libusb global variables FTBFS. (Closes: #680838)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fix FTBFS caused by generic global variables declaration.
 
2
Author: Didier Raboud <odyx@debian.org>
 
3
Origin: vendor
 
4
Bug: http://bugs.debian.org/680838
 
5
Last-Update: 2012-07-08
 
6
--- a/libfprint/core.c
 
7
+++ b/libfprint/core.c
 
8
@@ -291,25 +291,25 @@
 
9
 #ifndef ENABLE_DEBUG_LOGGING
 
10
        if (!log_level)
 
11
                return;
 
12
-       if (level == LOG_LEVEL_WARNING && log_level < 2)
 
13
+       if (level == FPRINT_LOG_LEVEL_WARNING && log_level < 2)
 
14
                return;
 
15
-       if (level == LOG_LEVEL_INFO && log_level < 3)
 
16
+       if (level == FPRINT_LOG_LEVEL_INFO && log_level < 3)
 
17
                return;
 
18
 #endif
 
19
 
 
20
        switch (level) {
 
21
-       case LOG_LEVEL_INFO:
 
22
+       case FPRINT_LOG_LEVEL_INFO:
 
23
                prefix = "info";
 
24
                break;
 
25
-       case LOG_LEVEL_WARNING:
 
26
+       case FPRINT_LOG_LEVEL_WARNING:
 
27
                stream = stderr;
 
28
                prefix = "warning";
 
29
                break;
 
30
-       case LOG_LEVEL_ERROR:
 
31
+       case FPRINT_LOG_LEVEL_ERROR:
 
32
                stream = stderr;
 
33
                prefix = "error";
 
34
                break;
 
35
-       case LOG_LEVEL_DEBUG:
 
36
+       case FPRINT_LOG_LEVEL_DEBUG:
 
37
                stream = stderr;
 
38
                prefix = "debug";
 
39
                break;
 
40
--- a/libfprint/fp_internal.h
 
41
+++ b/libfprint/fp_internal.h
 
42
@@ -33,10 +33,10 @@
 
43
         (type *)( (char *)__mptr - offsetof(type,member) );})
 
44
 
 
45
 enum fpi_log_level {
 
46
-       LOG_LEVEL_DEBUG,
 
47
-       LOG_LEVEL_INFO,
 
48
-       LOG_LEVEL_WARNING,
 
49
-       LOG_LEVEL_ERROR,
 
50
+       FPRINT_LOG_LEVEL_DEBUG,
 
51
+       FPRINT_LOG_LEVEL_INFO,
 
52
+       FPRINT_LOG_LEVEL_WARNING,
 
53
+       FPRINT_LOG_LEVEL_ERROR,
 
54
 };
 
55
 
 
56
 void fpi_log(enum fpi_log_level, const char *component, const char *function,
 
57
@@ -53,14 +53,14 @@
 
58
 #endif
 
59
 
 
60
 #ifdef ENABLE_DEBUG_LOGGING
 
61
-#define fp_dbg(fmt...) _fpi_log(LOG_LEVEL_DEBUG, fmt)
 
62
+#define fp_dbg(fmt...) _fpi_log(FPRINT_LOG_LEVEL_DEBUG, fmt)
 
63
 #else
 
64
 #define fp_dbg(fmt...)
 
65
 #endif
 
66
 
 
67
-#define fp_info(fmt...) _fpi_log(LOG_LEVEL_INFO, fmt)
 
68
-#define fp_warn(fmt...) _fpi_log(LOG_LEVEL_WARNING, fmt)
 
69
-#define fp_err(fmt...) _fpi_log(LOG_LEVEL_ERROR, fmt)
 
70
+#define fp_info(fmt...) _fpi_log(FPRINT_LOG_LEVEL_INFO, fmt)
 
71
+#define fp_warn(fmt...) _fpi_log(FPRINT_LOG_LEVEL_WARNING, fmt)
 
72
+#define fp_err(fmt...) _fpi_log(FPRINT_LOG_LEVEL_ERROR, fmt)
 
73
 
 
74
 #ifndef NDEBUG
 
75
 #define BUG_ON(condition) \