Bug 233616 - sysutils/conky: fix build with GCC-based architectures
Summary: sysutils/conky: fix build with GCC-based architectures
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Guido Falsi
URL: https://github.com/brndnmtthws/conky/...
Keywords:
Depends on:
Blocks:
 
Reported: 2018-11-28 19:02 UTC by Piotr Kubaj
Modified: 2018-11-29 10:36 UTC (History)
2 users (show)

See Also:
madpilot: maintainer-feedback+


Attachments
patch (1.26 KB, patch)
2018-11-28 19:02 UTC, Piotr Kubaj
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Piotr Kubaj freebsd_committer freebsd_triage 2018-11-28 19:02:17 UTC
Created attachment 199648 [details]
patch

GCC includes during compilation /usr/include/machine/md_var.h. This header has a definition of void cpu_setup(u_int) which clashes with static short cpu_setup in src/freebsd.cc. Change name of cpu_setup to conky_cpu_setup to fix compilation.

Tested on powerpc64 and amd64.

Hardware sponsored by IntegriCloud.
Comment 1 Guido Falsi freebsd_committer freebsd_triage 2018-11-29 09:43:53 UTC
Thanks for the patch. I'll commit it shortly, after some basic testing.

I'll also be proposing this upstream.
Comment 2 commit-hook freebsd_committer freebsd_triage 2018-11-29 10:33:59 UTC
A commit references this bug:

Author: madpilot
Date: Thu Nov 29 10:33:29 UTC 2018
New revision: 486162
URL: https://svnweb.freebsd.org/changeset/ports/486162

Log:
  Fix build with GCC-based architectures.

  Fix changes the name of a variable to avoid clash with a function
  name defined in an include file used by GCC.

  PR:		233616
  Submitted by:	Piotr Kubaj <pkubaj@anongoth.pl>

Changes:
  head/sysutils/conky/files/patch-src_freebsd.cc
Comment 3 Guido Falsi freebsd_committer freebsd_triage 2018-11-29 10:36:29 UTC
Patch committed. Thanks.

Added related upstream pull request in URL field.