@@ -6,6 +6,8 @@
#ifndef _TRACE_FS_LOCAL_H
#define _TRACE_FS_LOCAL_H
+#define __hidden __attribute__((visibility ("hidden")))
+
/* Can be overridden */
void warning(const char *fmt, ...);
int str_read_file(const char *file, char **buffer);
@@ -210,7 +210,7 @@ static char **add_list_string(char **list, const char *name, int len)
return list;
}
-char *trace_append_file(const char *dir, const char *name)
+__hidden char *trace_append_file(const char *dir, const char *name)
{
char *file;
int ret;
@@ -15,6 +15,7 @@
#include <unistd.h>
#include "tracefs.h"
+#include "tracefs-local.h"
#define TRACEFS_PATH "/sys/kernel/tracing"
#define DEBUGFS_PATH "/sys/kernel/debug"
@@ -188,7 +189,7 @@ void tracefs_put_tracing_file(char *name)
free(name);
}
-int str_read_file(const char *file, char **buffer)
+__hidden int str_read_file(const char *file, char **buffer)
{
char stbuf[BUFSIZ];
char *buf = NULL;
There are internal library functions, which are not declared as a static. They are used inside the library from different files. Hide them from the library users, as they are not part of the API: trace_append_file() str_read_file() Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com> --- lib/tracefs/include/tracefs-local.h | 2 ++ lib/tracefs/tracefs-events.c | 2 +- lib/tracefs/tracefs-utils.c | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-)