From 79d22036cbb69992286c272efc18b68bcdf3efbe Mon Sep 17 00:00:00 2001 From: Peter Gordon Date: Jan 11 2008 03:39:22 +0000 Subject: Add upstream patch to fix compile errors with recent libgtop stuffs. --- diff --git a/nemiver-pid_t-fix-build.patch b/nemiver-pid_t-fix-build.patch new file mode 100644 index 0000000..65e66f9 --- /dev/null +++ b/nemiver-pid_t-fix-build.patch @@ -0,0 +1,65 @@ +diff -up ./src/common/nmv-proc-mgr.h.old ./src/common/nmv-proc-mgr.h +--- ./src/common/nmv-proc-mgr.h.old 2008-01-10 19:33:01.000000000 -0800 ++++ ./src/common/nmv-proc-mgr.h 2008-01-10 19:33:25.000000000 -0800 +@@ -122,7 +122,7 @@ public: + virtual ~IProcMgr () {} + static IProcMgrSafePtr create () ; + virtual const list& get_all_process_list () const = 0; +- virtual bool get_process_from_pid (unsigned int a_pid, ++ virtual bool get_process_from_pid (pid_t a_pid, + Process &a_process) const = 0; + virtual bool get_process_from_name + (const UString &a_pname, +diff -up ./src/common/nmv-proc-mgr.cc.old ./src/common/nmv-proc-mgr.cc +--- ./src/common/nmv-proc-mgr.cc.old 2008-01-10 19:30:38.000000000 -0800 ++++ ./src/common/nmv-proc-mgr.cc 2008-01-10 19:32:10.000000000 -0800 +@@ -51,7 +51,7 @@ protected: + public: + virtual ~ProcMgr () ; + const list& get_all_process_list () const ; +- bool get_process_from_pid (unsigned int a_pid, ++ bool get_process_from_pid (pid_t a_pid, + Process &a_process) const; + bool get_process_from_name (const UString &a_pname, + Process &a_process, +@@ -85,13 +85,18 @@ ProcMgr::get_all_process_list () const + { + glibtop_proclist buf_desc ; + memset (&buf_desc, 0, sizeof (buf_desc)) ; +- unsigned int *pids=NULL; ++ pid_t *pids=NULL; + + m_process_list.clear () ; + + try { + //get the list of pids +- pids = glibtop_get_proclist (&buf_desc, GLIBTOP_KERN_PROC_ALL, 0) ; ++ //this is an ugly cast, but I am quite obliged ++ //since I have to support one version of glibtop_get_proclist() ++ //that returns an int* and one that returns pid_t* ++ pids = (pid_t*) glibtop_get_proclist (&buf_desc, ++ GLIBTOP_KERN_PROC_ALL, 0) ; ++ + + //get a couple of info about each pocess + for (unsigned i=0 ; i < buf_desc.number ; ++i) { +@@ -118,7 +123,7 @@ IProcMgr::create () + } + + bool +-ProcMgr::get_process_from_pid (unsigned int a_pid, ++ProcMgr::get_process_from_pid (pid_t a_pid, + IProcMgr::Process &a_process) const + { + LOG_FUNCTION_SCOPE_NORMAL_DD ; +diff -U0 ./ChangeLog.old ./ChangeLog +--- ./ChangeLog.old 2008-01-10 19:32:25.000000000 -0800 ++++ ./ChangeLog 2008-01-10 19:32:42.000000000 -0800 +@@ -0,0 +1,7 @@ ++2007-06-05 Dodji Seketeli ++ ++ * src/common/nmv-proc-mgr.cc,h: ++ change ProcMgr::get_process_from_pid() to make it use the pid_t ++ type instead of int. This is to reflect the API change ++ in libgtop HEAD that would break the compilation otherwise. ++ diff --git a/nemiver.spec b/nemiver.spec index c5b64ca..c2a444c 100644 --- a/nemiver.spec +++ b/nemiver.spec @@ -1,6 +1,6 @@ Name: nemiver Version: 0.4.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: A C/C++ Debugger for GNOME - point, click, debug! Group: Development/Debuggers @@ -9,6 +9,8 @@ URL: http://home.gna.org/nemiver/ Source0: http://ftp.gnome.org/pub/GNOME/sources/%{name}/0.4/%{name}-%{version}.tar.bz2 +Patch0: %{name}-pid_t-fix-build.patch + BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libgtksourceviewmm-devel >= 0.3.0 @@ -65,6 +67,7 @@ developing applications that use %{name}. %prep %setup -q +%patch0 -b .fix-pid_t-build-errors %build @@ -147,8 +150,11 @@ scrollkeeper-update -q ||: %changelog -* Fri Jan 04 2008 Peter Gordon +* Thu Jan 10 2008 Peter Gordon - 0.4.0-3 - Make GConf scriplets quieter (bug 426801: "unclean" rpm transaction). +- Add upstream patch to fix compile errors with casting from unsigned int* + to pid_t* due to libgtop API change: + + pid_t-fix-build.patch * Tue Aug 21 2007 Peter Gordon - 0.4.0-2 - Rebuild with BuildID-enabled binutils.