summaryrefslogtreecommitdiffstats
path: root/debian/patches/bugfix/all/libcpupower-hide-private-function.patch
blob: ac76e638eab26fdc00e5e74593fd386c5ca27e6d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
From: Ben Hutchings <ben@decadent.org.uk>
Date: Sat, 01 Dec 2018 19:22:50 +0000
Subject: libcpupower: Hide private function

cpupower_read_sysfs() (previously known as sysfs_read_file()) is an
internal function in libcpupower and should not be exported when
libcpupower is a shared library.  Change its visibility to "hidden".

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
--- a/tools/power/cpupower/lib/cpupower.c
+++ b/tools/power/cpupower/lib/cpupower.c
@@ -15,6 +15,7 @@
 #include "cpupower.h"
 #include "cpupower_intern.h"
 
+__attribute__((visibility("hidden")))
 unsigned int cpupower_read_sysfs(const char *path, char *buf, size_t buflen)
 {
 	int fd;