Saturday, May 26, 2007
Remains CD
I got my hard copy of Muddasheeps Remains today. It was packed with some nice artwork, which I am going to show off in a few days: My sister took our camera to Pullman City, therefore I was not able to take a picture of it, yet.
Tuesday, May 15, 2007
Turning off the bell in FreeBSD
It's that simple:
$ echo hw.syscons.bell=0 >> /etc/sysctl.conf
$ sysctl hw.syscons.bell=0
Monday, May 7, 2007
HuaWeiClient under FreeBSD
I recently got mailed up by an Chinese student who wished to run the HuaWeiClient under FreeBSD. Though he could not compile it for two reasons:
A wrong pragma pack in the global.h header file. GCC 3.4.6 did not like it:
As GCC suggested:
I corrected it:
And the code used some Linux specific ioctl() code named SIOCGIFHWADDR to get the mac address of the interfaces.
I replaced it with the proper sysctl() calls:
I know... the struct keyword is not necessary or may be even not pure C++... but it is my style; go with it.
The patches are available for download here. Just download the original software from the SorceForge project site and extract it. Then download my patches and extract them into the directory where your HuaWeiClient sources are located and type the following into a shell:
After you have finished patching the source files, compile it as usual. By typing:
If the patches do not work for you, please feel free to contact me.
A wrong pragma pack in the global.h header file. GCC 3.4.6 did not like it:
#pragma pack(push)
#pragma pack(1)
As GCC suggested:
warning: malformed '#pragma pack(push[, id],)' - ignored
I corrected it:
#pragma pack(push, 1)
And the code used some Linux specific ioctl() code named SIOCGIFHWADDR to get the mac address of the interfaces.
if (!(ioctl (fd, SIOCGIFHWADDR, (char *) &buf[i])))
I replaced it with the proper sysctl() calls:
if ( sysctl(mib, 6, 0, &len, 0, 0) == 0 )
{
buf = new char[len];
if ( sysctl(mib, 6, buf, &len, 0, 0) == 0 )
{
ifm = reinterpret_cast(buf);
sdl = reinterpret_cast(ifm+1);
ptr = reinterpret_cast(LLADDR(sdl));
// Now copy it into our destination buffer
for ( int j = 0; j < 6; ++j )
{
infoarray[i].macaddr[j] = (int)ptr[j];
}
}
}
I know... the struct keyword is not necessary or may be even not pure C++... but it is my style; go with it.
The patches are available for download here. Just download the original software from the SorceForge project site and extract it. Then download my patches and extract them into the directory where your HuaWeiClient sources are located and type the following into a shell:
$ patch global.h < global.h.patch
$ patch networkoperation.cpp < networkoperation.cpp.patch
After you have finished patching the source files, compile it as usual. By typing:
$ qmake
$ make
If the patches do not work for you, please feel free to contact me.
Sunday, May 6, 2007
HQ:Amen Kitty
Ha, Ha, Ha, staying alive, staying alive; Ha, Ha, Ha, staying alive, staying alive... >)
Saturday, May 5, 2007
Subscribe to:
Posts (Atom)