diff --git a/debian/changelog b/debian/changelog index ac43b879a..7db79bcda 100644 --- a/debian/changelog +++ b/debian/changelog @@ -27,6 +27,7 @@ linux (4.19.6-1~exp1) UNRELEASED; urgency=medium [ Ben Hutchings ] * debian/rules.real: Mark most targets as phony * debian/rules: Mark more targets as phony + * libcpupower: Hide private function and drop it from .symbols file -- Uwe Kleine-König Wed, 28 Nov 2018 12:20:46 +0100 diff --git a/debian/libcpupower1.symbols b/debian/libcpupower1.symbols index 1e691c28f..bd3e8fbc8 100644 --- a/debian/libcpupower1.symbols +++ b/debian/libcpupower1.symbols @@ -36,4 +36,3 @@ libcpupower.so.1 libcpupower1 #MINVER# cpuidle_state_usage@Base 4.7~rc2-1~exp1 cpupower_is_cpu_online@Base 4.7~rc2-1~exp1 get_cpu_topology@Base 4.7~rc2-1~exp1 - sysfs_read_file@Base 4.7~rc2-1~exp1 diff --git a/debian/patches/bugfix/all/libcpupower-hide-private-function.patch b/debian/patches/bugfix/all/libcpupower-hide-private-function.patch new file mode 100644 index 000000000..ac76e638e --- /dev/null +++ b/debian/patches/bugfix/all/libcpupower-hide-private-function.patch @@ -0,0 +1,20 @@ +From: Ben Hutchings +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 +--- +--- 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; diff --git a/debian/patches/series b/debian/patches/series index 846ff16eb..b5191ac9b 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -143,6 +143,7 @@ bugfix/all/tools-lib-traceevent-use-ldflags.patch bugfix/x86/revert-perf-build-fix-libunwind-feature-detection-on.patch bugfix/all/tools-build-remove-bpf-run-time-check-at-build-time.patch bugfix/all/cpupower-bump-soname-version.patch +bugfix/all/libcpupower-hide-private-function.patch bugfix/all/cpupower-fix-checks-for-cpu-existence.patch bugfix/all/tools-lib-api-fs-fs.c-fix-misuse-of-strncpy.patch bugfix/all/usbip-fix-misuse-of-strncpy.patch