diff options
| author | Donald Sharp <sharpd@cumulusnetworks.com> | 2019-02-13 12:47:23 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-02-13 12:47:23 -0500 |
| commit | cfef27e56ef3246a261ee0bf2810a46c08eebf8f (patch) | |
| tree | ac66ba3d1f7a037ad51f21bd54a236d5388f5916 /lib/log.h | |
| parent | 01490ba25da576ec0a72c896559ebc6fa71484be (diff) | |
| parent | 8ed561e1f13d0afb019a7963238bdd43ad017bec (diff) | |
Merge pull request #3622 from mjstapp/fix_cpp_compile
libs, daemons: changes to permit c++ compilation
Diffstat (limited to 'lib/log.h')
| -rw-r--r-- | lib/log.h | 12 |
1 files changed, 10 insertions, 2 deletions
@@ -29,6 +29,10 @@ #include <stdarg.h> #include "lib/hook.h" +#ifdef __cplusplus +extern "C" { +#endif + /* Hook for external logging function */ DECLARE_HOOK(zebra_ext_log, (int priority, const char *format, va_list args), (priority, format, args)); @@ -93,11 +97,11 @@ extern void zlog_debug(const char *format, ...) PRINTF_ATTRIBUTE(1, 2); /* For logs which have error codes associated with them */ #define flog_err(ferr_id, format, ...) \ - zlog_err("[EC %"PRIu32"] " format, ferr_id, ##__VA_ARGS__) + zlog_err("[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__) #define flog_err_sys(ferr_id, format, ...) \ flog_err(ferr_id, format, ##__VA_ARGS__) #define flog_warn(ferr_id, format, ...) \ - zlog_warn("[EC %"PRIu32"] " format, ferr_id, ##__VA_ARGS__) + zlog_warn("[EC %" PRIu32 "] " format, ferr_id, ##__VA_ARGS__) extern void zlog_thread_info(int log_level); @@ -196,4 +200,8 @@ struct timestamp_control { "Local use\n" \ "Local use\n" +#ifdef __cplusplus +} +#endif + #endif /* _ZEBRA_LOG_H */ |
