Bug 233616

Summary: sysutils/conky: fix build with GCC-based architectures
Product: Ports & Packages Reporter: Piotr Kubaj <pkubaj>
Component: Individual Port(s)Assignee: Guido Falsi <madpilot>
Status: Closed FIXED    
Severity: Affects Only Me CC: linimon, pkubaj
Priority: --- Flags: madpilot: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
URL: https://github.com/brndnmtthws/conky/pull/686
Attachments:
Description Flags
patch none

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.