Package: synaptic
Version: 0.80.4+dyson1
Severity: normal

Dear Maintainer,

please find patches which fix some portability issues:

dyson-rindex.patch: rindex() is defined in strings.h [rindex]
dyson-bzero.patch: bzero() is legacy, replace with memset() [bzero]
dyson-fcntl.patch: fcntl(0 is defined in fcntl.h [fcntl]

With these patches applied it is possible to rebuild Synaptic on Dyson
without changes [dyson]

[rindex] http://pubs.opengroup.org/onlinepubs/009695399/functions/rindex.html
[bzero] http://pubs.opengroup.org/onlinepubs/009695399/functions/bzero.html
[fcntl] http://pubs.opengroup.org/onlinepubs/009695399/functions/fcntl.html
[dyson] http://osdyson.org/

P. S. Sent from Dyson :-)



-- System Information:
Debian Release: bok
Architecture: illumos-amd64 (i86pc)

Kernel: SunOS 5.11
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash

Versions of packages synaptic depends on:
ii  hicolor-icon-theme   0.12-1
ii  libapt-inst1.5       0.9.7.5+dyson3
ii  libapt-pkg4.12       0.9.7.5+dyson3
ii  libatk1.0-0          2.8.0-2+dyson1
ii  libc1                2.10+12
ii  libcairo-gobject2    1.12.16-2+dyson1
ii  libcairo2            1.12.16-2+dyson1
ii  libept1.4.12         1.0.9+dyson1
ii  libgcc1              1:4.8.2-2+dyson1
ii  libgdk-pixbuf2.0-0   2.28.2-1+dyson1
ii  libglib2.0-0         2.36.3-3+dyson2
ii  libgtk-3-0           3.8.2-3+dyson1
ii  libm2                0.2.1
ii  libpango-1.0-0       1.32.5-5+dyson1
ii  libpangocairo-1.0-0  1.32.5-5+dyson1
ii  libstdc++6           4.8.2-2+dyson1
ii  libvte-2.90-9        1:0.34.6-1+dyson1
ii  libx11-6             2:1.6.2-1+dyson1
ii  libxapian22          1.2.8-1+dyson1
ii  libxext0             2:1.3.0-3+dyson1
ii  zlib1g               1:1.2.8.dfsg-1+dyson1

Versions of packages synaptic recommends:
ii  gksu           2.0.2-6+dyson1
pn  libgtk2-perl   <none>
ii  policykit-1    0.105-3+dyson2
ii  rarian-compat  0.8.1-5+dyson1

Versions of packages synaptic suggests:
pn  apt-xapian-index         <none>
pn  deborphan                <none>
pn  dwww                     <none>
ii  menu                     2.1.46+dyson1
pn  software-properties-gtk  <none>
pn  tasksel                  <none>

-- no debconf information
Index: synaptic-0.80.4+dyson1/common/rpackagefilter.cc
===================================================================
--- synaptic-0.80.4+dyson1.orig/common/rpackagefilter.cc	2012-07-12 23:13:41.000000000 +0400
+++ synaptic-0.80.4+dyson1/common/rpackagefilter.cc	2014-01-07 12:26:34.353004966 +0400
@@ -28,6 +28,7 @@
 #include <algorithm>
 #include <cstdio>
 #include <fnmatch.h>
+#include <strings.h>
 #include <apt-pkg/configuration.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/error.h>
Index: synaptic-0.80.4+dyson1/gtk/rgdebinstallprogress.cc
===================================================================
--- synaptic-0.80.4+dyson1.orig/gtk/rgdebinstallprogress.cc	2012-11-21 22:54:58.000000000 +0400
+++ synaptic-0.80.4+dyson1/gtk/rgdebinstallprogress.cc	2014-01-07 12:30:00.935776801 +0400
@@ -152,7 +152,7 @@
    // open connection to server
    struct sockaddr_un servaddr;
    int serverfd = socket(AF_LOCAL, SOCK_STREAM, 0);
-   bzero(&servaddr, sizeof(servaddr));
+   memset(&servaddr, 0, sizeof(servaddr));
    servaddr.sun_family = AF_LOCAL;
    strcpy(servaddr.sun_path, UNIXSTR_PATH);
 
@@ -181,7 +181,7 @@
    fcntl(listenfd, F_SETFL, O_NONBLOCK);
 
    unlink(UNIXSTR_PATH);
-   bzero(&servaddr, sizeof(servaddr));
+   memset(&servaddr, 0, sizeof(servaddr));
    servaddr.sun_family = AF_LOCAL;
    strcpy(servaddr.sun_path, UNIXSTR_PATH);
    bind(listenfd, (struct sockaddr *)&servaddr, sizeof(servaddr));
Index: synaptic-0.80.4+dyson1/gtk/rginstallprogress.cc
===================================================================
--- synaptic-0.80.4+dyson1.orig/gtk/rginstallprogress.cc	2012-01-30 15:24:22.000000000 +0400
+++ synaptic-0.80.4+dyson1/gtk/rginstallprogress.cc	2014-01-07 12:29:08.328087514 +0400
@@ -123,7 +123,7 @@
 void RGInstallProgress::finishUpdate()
 {
    char buf[1024];
-   bzero(buf, 1024);
+   memset(buf, 0, 1024);
    int len = read(_childin, buf, 1023);
    if (len > 0) {
       GtkWidget *dia = gtk_message_dialog_new(GTK_WINDOW(this->window()),
Index: synaptic-0.80.4+dyson1/common/raptoptions.cc
===================================================================
--- synaptic-0.80.4+dyson1.orig/common/raptoptions.cc	2012-06-11 19:31:11.000000000 +0400
+++ synaptic-0.80.4+dyson1/common/raptoptions.cc	2014-01-07 12:30:20.749340671 +0400
@@ -192,7 +192,7 @@
       if ((point = strrchr(dent->d_name, '.')) == NULL)
          continue;
       if (strcmp(point, configext) == 0) {
-         bzero(point, strlen(point));
+         memset(point, 0, strlen(point));
          //cout << (dent->d_name) << endl;
          setPackageDebconf(dent->d_name, true);
       }
Index: synaptic-0.80.4+dyson1/common/rcdscanner.cc
===================================================================
--- synaptic-0.80.4+dyson1.orig/common/rcdscanner.cc	2012-01-30 15:24:22.000000000 +0400
+++ synaptic-0.80.4+dyson1/common/rcdscanner.cc	2014-01-07 14:21:43.702008043 +0400
@@ -24,9 +24,9 @@
 #ifndef HAVE_APTPKG_CDROM
 
 #include <sys/stat.h>
-#include <sys/fcntl.h>
 #include <dirent.h>
 #include <unistd.h>
+#include <fcntl.h>
 #include <iostream>
 #include <fstream>
 #include <algorithm>
Index: synaptic-0.80.4+dyson1/common/rinstallprogress.cc
===================================================================
--- synaptic-0.80.4+dyson1.orig/common/rinstallprogress.cc	2012-01-30 15:24:22.000000000 +0400
+++ synaptic-0.80.4+dyson1/common/rinstallprogress.cc	2014-01-07 14:21:20.430935851 +0400
@@ -25,7 +25,7 @@
 #include "config.h"
 
 #include <unistd.h>
-#include <sys/fcntl.h>
+#include <fcntl.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <iostream>
Index: synaptic-0.80.4+dyson1/gtk/rgdebinstallprogress.cc
===================================================================
--- synaptic-0.80.4+dyson1.orig/gtk/rgdebinstallprogress.cc	2014-01-07 12:30:00.935776801 +0400
+++ synaptic-0.80.4+dyson1/gtk/rgdebinstallprogress.cc	2014-01-07 14:20:57.321763894 +0400
@@ -26,10 +26,10 @@
 #include <math.h>
 #include <sys/wait.h>
 #include <sys/types.h>
-#include <sys/fcntl.h>
 #include <sys/socket.h>
 #include <sys/un.h>
 #include <errno.h>
+#include <fcntl.h>
 
 #include "gtk3compat.h"
 

Reply via email to