Bug 104517 - kmilo: powerbook2 doesn't compile with pbbuttons 0.6.9
Summary: kmilo: powerbook2 doesn't compile with pbbuttons 0.6.9
Status: RESOLVED FIXED
Alias: None
Product: kmilo
Classification: Miscellaneous
Component: Powerbook2 module (show other bugs)
Version: unspecified
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Zack Rusin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-25 13:39 UTC by Julien "KaZe" Rozo
Modified: 2005-06-07 16:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
pbbuttonsd >= 0.6.8 patch (326 bytes, patch)
2005-06-01 14:46 UTC, Joseph Jezak
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Julien "KaZe" Rozo 2005-04-25 13:39:55 UTC
Version:            (using KDE KDE 3.4.0)
Installed from:    Compiled From Sources
Compiler:          gcc 3.4.3 (PowerPC) 
OS:                Linux

Hi,

When compiling kdeutils 3.4.0 on my iBook (G4, 768MB of RAM), the compilation fails with this message :

"pb_monitor.cpp: In member function `virtual bool PowerBookMonitor::init()':
/usr/include/pbbipc.h:51: error: too few arguments to function `int ipc_init(char*, int, int)'
pb_monitor.cpp:68: error: at this point in file"

If I remove pbbuttons 0.6.9 from my system, kdeutils compiles flawlessly.

I also tried compiling with pbbuttons out-of-the-box config file, and with my own one. In each case, kdeutils doesn't compile with the error above.

I use gcc 3.4.3 on SourceMage GNU/Linux distribution.
Comment 1 Joseph Jezak 2005-06-01 14:46:56 UTC
Created attachment 11283 [details]
pbbuttonsd >= 0.6.8 patch

In versions of pbbuttonsd >= 0.6.8, the ipc_init function has changed from 
int ipc_init(int, int) to int ipc_init(char *, int, int).

This patch fixes the problem.
Comment 2 Dirk Mueller 2005-06-07 16:33:13 UTC
SVN commit 423099 by mueller:

fix libpbb failure with pbbuttonsd >= 0.6.8
CCBUG: 104517


 M  +5 -0      pb_monitor.cpp  


--- trunk/KDE/kdeutils/kmilo/powerbook2/pb_monitor.cpp #423098:423099
@@ -65,7 +65,12 @@
 
 bool PowerBookMonitor::init()
 {
+// pbbuttons 0.6.7 or newer
+#ifdef CLIENT_REGISTER
+	return ( ipc_init( "kmilo", LIBMODE_CLIENT, CLIENT_REGISTER ) == 0 );
+#else
 	return ( ipc_init( LIBMODE_CLIENT, 1 ) == 0 );
+#endif
 }
 
 
Comment 3 Dirk Mueller 2005-06-07 16:35:41 UTC
SVN commit 423100 by mueller:

fix compile failure with pbbuttons >= 0.6.9
BUG: 104517


 M  +5 -0      pb_monitor.cpp  


--- branches/KDE/3.4/kdeutils/kmilo/powerbook2/pb_monitor.cpp #423099:423100
@@ -65,7 +65,12 @@
 
 bool PowerBookMonitor::init()
 {
+// pbbuttons 0.6.7 or newer
+#ifdef CLIENT_REGISTER
+	return ( ipc_init( "kmilo", LIBMODE_CLIENT, CLIENT_REGISTER ) == 0 );
+#else
 	return ( ipc_init( LIBMODE_CLIENT, 1 ) == 0 );
+#endif
 }