Commit ff842125 authored by Kunal Gangakhedkar's avatar Kunal Gangakhedkar Committed by Bastien Nocera

Add C++ guards to take care of C++ name-mangling.

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: default avatarGuus Ellenkamp <guus@activediscovery.net>
Signed-off-by: default avatarKunal Gangakhedkar <kunal.gangakhedkar@gmail.com>
parent 712ebb6d
...@@ -20,6 +20,10 @@ ...@@ -20,6 +20,10 @@
#ifndef __FPRINT_H__ #ifndef __FPRINT_H__
#define __FPRINT_H__ #define __FPRINT_H__
#ifdef __cplusplus
extern "C" {
#endif
#include <stdint.h> #include <stdint.h>
#include <sys/time.h> #include <sys/time.h>
...@@ -336,5 +340,9 @@ typedef void (*fp_identify_stop_cb)(struct fp_dev *dev, void *user_data); ...@@ -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, int fp_async_identify_stop(struct fp_dev *dev, fp_identify_stop_cb callback,
void *user_data); void *user_data);
#ifdef __cplusplus
}
#endif
#endif #endif
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment