diff options
author | Karol Lewandowski <k.lewandowsk@samsung.com> | 2018-09-25 13:38:58 +0200 |
---|---|---|
committer | Karol Lewandowski <k.lewandowsk@samsung.com> | 2018-10-03 11:22:41 +0200 |
commit | 918ec37ac5024dcec1dd9b34ee86254e476c0eb4 (patch) | |
tree | 7e016db985a15954933b8e775fe04b53e55b1205 | |
parent | 89950370359f4af6b9ebee5466c8e5450fc6751a (diff) | |
download | crash-worker-918ec37ac5024dcec1dd9b34ee86254e476c0eb4.tar.gz crash-worker-918ec37ac5024dcec1dd9b34ee86254e476c0eb4.tar.bz2 crash-worker-918ec37ac5024dcec1dd9b34ee86254e476c0eb4.zip |
util: Allow functions to be called from c++
Change-Id: If4dc6b6e494096713e76a1345ab3753a6914e1c2
-rw-r--r-- | src/shared/util.h | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/shared/util.h b/src/shared/util.h index c4aa1a6..03de693 100644 --- a/src/shared/util.h +++ b/src/shared/util.h @@ -23,6 +23,12 @@ #define __CONSTRUCTOR__ __attribute__ ((constructor)) #endif +#define fprintf_fd(fd, fmt, ...) dprintf(fd, fmt, ##__VA_ARGS__) + +#ifdef __cplusplus +extern "C" { +#endif + int system_command(char *command); int system_command_with_timeout(int timeout_seconds, char *command); @@ -31,8 +37,6 @@ int system_command_parallel(char *command); int wait_system_command(int pid); -#define fprintf_fd(fd, fmt, ...) dprintf(fd, fmt, ##__VA_ARGS__) - int write_fd(int fd, const void *buf, int len); int copy_file(char *src, char *dst); @@ -62,6 +66,11 @@ char* get_exe_path(pid_t pid); char* get_cmd_line(pid_t pid); char *nullvec2str(char *const vec[]); + +#ifdef __cplusplus +} +#endif + /** * @} */ |