! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
When Polkit is enabled, build fails
Status:
RESOLVED: FIXED
Product:
Xfce4-power-manager
Component:
General

Comments

Description Olivier Duchateau 2012-04-16 22:25:42 CEST
Created attachment 4333 
Patch to build under FreeBSD when Polkit is enable

Under FreeBSD, when polkit is enabled, build fails (below, log excerpt).

[...]
  CC     xfce4_power_manager-xfpm-polkit.o
xfpm-polkit.c:99: warning: 'struct kinfo_proc' declared inside parameter list
xfpm-polkit.c:99: warning: its scope is only this definition or declaration, whi
ch is probably not what you want
xfpm-polkit.c: In function 'get_kinfo_proc':
xfpm-polkit.c:107: error: invalid application of 'sizeof' to incomplete type 'st
ruct kinfo_proc'
xfpm-polkit.c: In function 'get_start_time_for_pid':
xfpm-polkit.c:180: error: storage size of 'p' isn't known
gmake[3]: *** [xfce4_power_manager-xfpm-polkit.o] Erreur 1
gmake[3] : on quitte le répertoire « /usr/ports/sysutils/xfce4-power-manager/wor
k/xfce4-power-manager-1.1.0/src »
gmake[2]: *** [all] Erreur 2
gmake[2] : on quitte le répertoire « /usr/ports/sysutils/xfce4-power-manager/wor
k/xfce4-power-manager-1.1.0/src »
gmake[1]: *** [all-recursive] Erreur 1
gmake[1] : on quitte le répertoire « /usr/ports/sysutils/xfce4-power-manager/wor
k/xfce4-power-manager-1.1.0 »
gmake: *** [all] Erreur 2
*** Error code 1

Stop in /usr/ports/sysutils/xfce4-power-manager.

To use kinfo_proc, we need to load sys/user.h (like linux), and according to sysctl(3) man page, http://www.freebsd.org/cgi/man.cgi?query=sysctl&sektion=3 sys/types.h and sys/sysctl.h are also needed.

Patch fixes this issue.
Comment 1 Nick Schermer editbugs 2012-04-17 21:34:37 CEST
Applied in 8a30a7b.

Bug #8712

Reported by:
Olivier Duchateau
Reported on: 2012-04-16
Last modified on: 2012-04-17

People

Assignee:
Ali Abdallah
CC List:
1 user

Version

Attachments

Patch to build under FreeBSD when Polkit is enable (411 bytes, application/octet-stream)
2012-04-16 22:25 CEST , Olivier Duchateau
no flags

Additional information