File: libcpupower-hide-private-function.patch

package info (click to toggle)
linux 4.19.249-2
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 968,784 kB
  • sloc: ansic: 16,810,930; asm: 272,263; makefile: 38,450; sh: 33,900; perl: 27,702; python: 21,148; cpp: 5,068; yacc: 4,650; lex: 2,584; awk: 1,386; ruby: 25; sed: 5
file content (22 lines) | stat: -rw-r--r-- 800 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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>
---
Index: linux/tools/power/cpupower/lib/cpupower.c
===================================================================
--- linux.orig/tools/power/cpupower/lib/cpupower.c
+++ linux/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;