libudev: wrap in extern "C" block for C++

When libudev.h is included from C++ code, wrap the declarations in an
extern "C" { ... } block.  This tells the C++ compiler that symbols
are exported with C linkage and no name-mangling.
This commit is contained in:
Daniel Elstner 2009-12-14 21:15:20 +01:00 committed by Kay Sievers
parent 9c0c2fe6bb
commit 3fac12b9a0

View file

@ -16,6 +16,10 @@
#include <sys/types.h>
#include <sys/stat.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* udev - library context
*
@ -158,4 +162,9 @@ int udev_queue_get_seqnum_sequence_is_finished(struct udev_queue *udev_queue,
unsigned long long int start, unsigned long long int end);
struct udev_list_entry *udev_queue_get_queued_list_entry(struct udev_queue *udev_queue);
struct udev_list_entry *udev_queue_get_failed_list_entry(struct udev_queue *udev_queue);
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif