common: compile libconfig as C++
[lttng-tools.git] / src / common / runas.h
index 58c376fe1a0b91b5627315d7872a35cfffa153e2..ca084102e4ae8c17d424465c97016fb3c03a3698 100644 (file)
 #include <common/macros.h>
 #include <common/sessiond-comm/sessiond-comm.h>
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /*
  * The run-as process is launched by forking without an exec*() call. This means
  * that any resource allocated before the run-as worker is launched should be
@@ -46,9 +50,9 @@ int run_as_rmdir(const char *path, uid_t uid, gid_t gid);
 int run_as_rmdir_recursive(const char *path, uid_t uid, gid_t gid, int flags);
 int run_as_rmdirat(int dirfd, const char *path, uid_t uid, gid_t gid);
 int run_as_rmdirat_recursive(int dirfd, const char *path, uid_t uid, gid_t gid, int flags);
-int run_as_rename(const char *old, const char *new, uid_t uid, gid_t gid);
-int run_as_renameat(int old_dirfd, const char *old,
-               int new_dirfd, const char *new, uid_t uid, gid_t gid);
+int run_as_rename(const char *old_name, const char *new_name, uid_t uid, gid_t gid);
+int run_as_renameat(int old_dirfd, const char *old_name,
+               int new_dirfd, const char *new_name, uid_t uid, gid_t gid);
 int run_as_extract_elf_symbol_offset(int fd, const char* function,
                uid_t uid, gid_t gid, uint64_t *offset);
 int run_as_extract_sdt_probe_offsets(int fd, const char *provider_name,
@@ -61,4 +65,8 @@ int run_as_create_worker(const char *procname,
                post_fork_cleanup_cb clean_up_func, void *clean_up_user_data);
 void run_as_destroy_worker(void);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _RUNAS_H */
This page took 0.026172 seconds and 4 git commands to generate.