Skip to content

Commit a2e91a1

Browse files
committed
libspl: hide zfs_tunable_* symbols
The zfs_tunable_* functions are a public interface which are part of the internal libspl convenience library. They should be hidden to prevent an ABI change in installed libraries which link against libspl (e.g. libzfs_core). Signed-off-by: Brian Behlendorf <[email protected]>
1 parent f33b4cf commit a2e91a1

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

lib/libspl/include/sys/tunables.h

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
*/
2626

2727
#ifndef _SYS_TUNABLES_H
28-
#define _SYS_TUNABLES_H
28+
#define _SYS_TUNABLES_H extern __attribute__((visibility("hidden")))
2929

3030
typedef enum {
3131
ZFS_TUNABLE_TYPE_INT,
@@ -49,12 +49,14 @@ typedef struct zfs_tunable {
4949
const char *zt_desc;
5050
} zfs_tunable_t;
5151

52-
int zfs_tunable_set(const zfs_tunable_t *tunable, const char *val);
53-
int zfs_tunable_get(const zfs_tunable_t *tunable, char *val, size_t valsz);
52+
_SYS_TUNABLES_H int zfs_tunable_set(const zfs_tunable_t *tunable,
53+
const char *val);
54+
_SYS_TUNABLES_H int zfs_tunable_get(const zfs_tunable_t *tunable, char *val,
55+
size_t valsz);
5456

55-
const zfs_tunable_t *zfs_tunable_lookup(const char *name);
57+
_SYS_TUNABLES_H const zfs_tunable_t *zfs_tunable_lookup(const char *name);
5658

5759
typedef int (*zfs_tunable_iter_t)(const zfs_tunable_t *tunable, void *arg);
58-
void zfs_tunable_iter(zfs_tunable_iter_t cb, void *arg);
60+
_SYS_TUNABLES_H void zfs_tunable_iter(zfs_tunable_iter_t cb, void *arg);
5961

6062
#endif

0 commit comments

Comments
 (0)