summaryrefslogtreecommitdiffstats
path: root/linux/LinuxProcess.h
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2020-07-10 10:35:32 +1000
committerNathan Scott <nathans@redhat.com>2020-07-10 10:35:32 +1000
commitdfd9279f87791e36a5212726781c31fbe7110361 (patch)
treeee044449e757e2ae56e876efd02c5b1965c05924 /linux/LinuxProcess.h
parent402e46bb82964366746b86d77eb5afa69c279539 (diff)
Resolve complation issues with -fno-common (default from gcc-10)
Extends the MakeHeader script to auto-generate correct "extern" function declarations in some cases that it currently does not. Related to https://github.com/hishamhm/htop/pull/981
Diffstat (limited to 'linux/LinuxProcess.h')
-rw-r--r--linux/LinuxProcess.h19
1 files changed, 10 insertions, 9 deletions
diff --git a/linux/LinuxProcess.h b/linux/LinuxProcess.h
index 6ce3037d..586aa717 100644
--- a/linux/LinuxProcess.h
+++ b/linux/LinuxProcess.h
@@ -144,7 +144,8 @@ typedef struct LinuxProcess_ {
#endif
-long long btime; /* semi-global */
+/* semi-global */
+extern long long btime;
extern ProcessFieldData Process_fields[];
@@ -152,9 +153,9 @@ extern ProcessPidColumn Process_pidColumns[];
extern ProcessClass LinuxProcess_class;
-LinuxProcess* LinuxProcess_new(Settings* settings);
+extern LinuxProcess* LinuxProcess_new(Settings* settings);
-void Process_delete(Object* cast);
+extern void Process_delete(Object* cast);
/*
[1] Note that before kernel 2.6.26 a process that has not asked for
@@ -166,19 +167,19 @@ extern io_priority;
*/
#define LinuxProcess_effectiveIOPriority(p_) (IOPriority_class(p_->ioPriority) == IOPRIO_CLASS_NONE ? IOPriority_tuple(IOPRIO_CLASS_BE, (p_->super.nice + 20) / 5) : p_->ioPriority)
-IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this);
+extern IOPriority LinuxProcess_updateIOPriority(LinuxProcess* this);
-bool LinuxProcess_setIOPriority(LinuxProcess* this, IOPriority ioprio);
+extern bool LinuxProcess_setIOPriority(LinuxProcess* this, IOPriority ioprio);
#ifdef HAVE_DELAYACCT
-void LinuxProcess_printDelay(float delay_percent, char* buffer, int n);
+extern void LinuxProcess_printDelay(float delay_percent, char* buffer, int n);
#endif
-void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field);
+extern void LinuxProcess_writeField(Process* this, RichString* str, ProcessField field);
-long LinuxProcess_compare(const void* v1, const void* v2);
+extern long LinuxProcess_compare(const void* v1, const void* v2);
-bool Process_isThread(Process* this);
+extern bool Process_isThread(Process* this);
#endif

© 2014-2024 Faster IT GmbH | imprint | privacy policy