[fprint] [PATCH] Add C++ guards to take care of C++ name-mangling.
Kunal Gangakhedkar
kunal.gangakhedkar at gmail.com
Wed Sep 8 07:43:17 BST 2010
The libfprint library is generally built with C calling conventions.
Which makes it difficult to link to C++ programs as it is.
This patch adds the support for linking with C++ code - by telling the C++
compiler to use C calling conventions for libfprint functions.
Reported-by: Guus Ellenkamp <guus at activediscovery.net>
Signed-off-by: Kunal Gangakhedkar <kunal.gangakhedkar at gmail.com>
---
libfprint/fprint.h | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
diff --git a/libfprint/fprint.h b/libfprint/fprint.h
index 319b600..99fa1e1 100644
--- a/libfprint/fprint.h
+++ b/libfprint/fprint.h
@@ -20,6 +20,10 @@
#ifndef __FPRINT_H__
#define __FPRINT_H__
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <stdint.h>
#include <sys/time.h>
@@ -336,5 +340,9 @@ typedef void (*fp_identify_stop_cb)(struct fp_dev *dev, void *user_data);
int fp_async_identify_stop(struct fp_dev *dev, fp_identify_stop_cb callback,
void *user_data);
+#ifdef __cplusplus
+}
+#endif
+
#endif
--
1.7.0.4
More information about the fprint
mailing list