Skip to content

Commit

Permalink
Make header usable from C++
Browse files Browse the repository at this point in the history
  • Loading branch information
jengelh authored and thkukuk committed Feb 6, 2025
1 parent 86b8442 commit ffa05c1
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions include/wtmpdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@
#define NSEC_PER_USEC ((uint64_t) 1000ULL)
#define USEC_PER_SEC ((uint64_t) 1000000ULL)

#ifdef __cplusplus
extern "C" {
#endif

extern int64_t logwtmpdb (const char *db_path, const char *tty,
const char *name, const char *host,
const char *service, char **error);
Expand Down Expand Up @@ -71,3 +75,7 @@ extern uint64_t wtmpdb_get_boottime (const char *db_path, char **error);
extern int64_t wtmpdb_get_id (const char *db_path, const char *tty,
char **error);
extern uint64_t wtmpdb_timespec2usec (const struct timespec ts);

#ifdef __cplusplus
}
#endif

0 comments on commit ffa05c1

Please sign in to comment.