[SCM] qtbase packaging branch, experimental, updated. debian/5.5.0+dfsg-1-15-g71f5d78
Dmitry Shachnev
mitya57 at moszumanska.debian.org
Fri Jul 31 12:02:31 UTC 2015
Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtbase.git;a=commitdiff;h=71f5d78
The following commit has been merged in the experimental branch:
commit 71f5d7885d441f27a4e850a19536679279b4766d
Author: Dmitry Shachnev <mitya57 at gmail.com>
Date: Fri Jul 31 15:01:58 2015 +0300
Add processNameByPid implementation for GNU/kFreeBSD.
---
debian/changelog | 2 +
debian/patches/gnukfreebsd_processNameByPid.diff | 49 ++++++++++++++++++++++++
debian/patches/series | 1 +
3 files changed, 52 insertions(+)
diff --git a/debian/changelog b/debian/changelog
index 21c48db..829fb77 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,8 @@ qtbase-opensource-src (5.5.0+dfsg-2) UNRELEASED; urgency=medium
[ Dmitry Shachnev ]
* Update symbols files with buildds’ logs.
* Merge 5.4.2+dfsg-5 unstable upload.
+ * Add processNameByPid implementation for GNU/kFreeBSD
+ (gnukfreebsd_processNameByPid.diff).
-- Debian Qt/KDE Maintainers <debian-qt-kde at lists.debian.org> Sun, 12 Jul 2015 14:29:16 -0300
diff --git a/debian/patches/gnukfreebsd_processNameByPid.diff b/debian/patches/gnukfreebsd_processNameByPid.diff
new file mode 100644
index 0000000..5021958
--- /dev/null
+++ b/debian/patches/gnukfreebsd_processNameByPid.diff
@@ -0,0 +1,49 @@
+Description: add processNameByPid implementation for GNU/kFreeBSD
+Author: Dmitry Shachnev <mitya57 at debian.org>
+Forwarded: no
+Last-Update: 2015-07-31
+
+--- a/src/corelib/io/qlockfile_unix.cpp
++++ b/src/corelib/io/qlockfile_unix.cpp
+@@ -56,6 +56,13 @@
+ # include <cstdio>
+ #elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
+ # include <sys/user.h>
++# ifdef __GLIBC__
++# include <sys/cdefs.h>
++# include <sys/param.h>
++# include <sys/sysctl.h>
++# include <cstdlib>
++# include <cstring>
++# endif
+ #endif
+
+ QT_BEGIN_NAMESPACE
+@@ -232,9 +239,27 @@
+ }
+ return QFileInfo(QString::fromUtf8(buf)).fileName();
+ #elif defined(Q_OS_BSD4) && !defined(Q_OS_IOS)
++#ifdef __GLIBC__
++ int mib[4] = {CTL_KERN, KERN_PROC, KERN_PROC_PID, pid};
++ size_t len = 0;
++ if (sysctl(mib, 4, NULL, &len, NULL, 0) < 0)
++ return QString();
++ kinfo_proc *proc = static_cast<kinfo_proc *>(malloc(len));
++#else
+ kinfo_proc *proc = kinfo_getproc(pid);
++#endif /* __GLIBC__ */
+ if (!proc)
+ return QString();
++#ifdef __GLIBC__
++ if (sysctl(mib, 4, proc, &len, NULL, 0) < 0) {
++ free(proc);
++ return QString();
++ }
++ if (proc->ki_pid != pid) {
++ free(proc);
++ return QString();
++ }
++#endif /* __GLIBC__ */
+ QString name = QString::fromUtf8(proc->ki_comm);
+ free(proc);
+ return name;
diff --git a/debian/patches/series b/debian/patches/series
index f6d7c56..5e1917a 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,4 @@ gnukfreebsd.diff
no_htmlinfo_example.diff
remove_privacy_breachs.diff
hurd-forkfd.diff
+gnukfreebsd_processNameByPid.diff
--
qtbase packaging
More information about the pkg-kde-commits
mailing list