Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:11.4
xosview
xosview-1.8.1-procsys.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File xosview-1.8.1-procsys.patch of Package xosview
--- linux/netmeter.cc +++ linux/netmeter.cc Tue Jan 20 16:54:13 2004 @@ -34,6 +34,7 @@ #include <stdlib.h> #include <sys/socket.h> #include <sys/ioctl.h> +#include <sys/utsname.h> #if defined(GNULIBC) || defined(__GLIBC__) #include <net/if.h> #else @@ -60,20 +61,16 @@ void NetMeter::checkOSVersion(void) { - std::ifstream ifs("/proc/sys/kernel/osrelease"); - if (!ifs) - { - std::cerr <<"Can not open file : " << "/proc/sys/kernel/osrelease" - << std::endl; - exit(1); - } - + struct utsname myosrelease; + char *myendptr; int major, minor; + + uname(&myosrelease); + _bytesInDev = 0; - ifs >> major; - ifs.ignore(1); - ifs >> minor; - ifs.ignore(1); + + major=strtol(myosrelease.release, &myendptr, 10); + minor=strtol(myendptr+1, (char **)NULL, 10); if (major > 2 || (major == 2 && minor >= 1)) {
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor