mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-14 04:54:37 +03:00
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
This commit is contained in:
@ -54,8 +54,10 @@ for line in file.readlines():
|
||||
elif line.startswith("typedef struct"):
|
||||
state = SKIP
|
||||
elif line[-1] == "{":
|
||||
out.write( line[:-2].replace("inline", "extern") + ";\n" )
|
||||
out.write("extern " + line[:-2].replace("inline ", "") + ";\n")
|
||||
state = SKIP
|
||||
elif line[-1] == ";":
|
||||
out.write("extern " + line + "\n")
|
||||
else:
|
||||
out.write( line + "\n")
|
||||
is_blank = False
|
||||
|
Reference in New Issue
Block a user