[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#33658: dpkg: portability fix for filesdb.h



Package: dpkg
Version: 1.4.1

Hi,

not all systems have sysinfo (for example the Hurd). This patch takes
care of that. I think it is safe to assume largemem if sysinfo is missing.
If you don't agree, you can change the default below to "-1" (in the #else
condition).

Thank you,
Marcus

diff -ur dpkg-1.4.1.o/main/filesdb.c dpkg-1.4.1/main/filesdb.c
--- dpkg-1.4.1.o/main/filesdb.c Sun Nov  1 17:06:30 1998
+++ dpkg-1.4.1/main/filesdb.c   Mon Jan 11 23:39:18 1999
@@ -485,9 +485,12 @@

 void filesdbinit(void) {
   struct filenamenode *fnn;
+#ifdef HAVE_SYSINFO
   struct sysinfo info;
+#endif
   int i;

+#ifdef HAVE_SYSINFO
   if (!f_largemem) {
     f_largemem= -1;
     if (!sysinfo(&info)) {
@@ -496,6 +499,9 @@
         f_largemem= 1;
     }
   }
+#else
+  f_largemem= 1;
+#endif

   switch (f_largemem) {
   case 1:


-- System Information
Debian Release: 2.1
Kernel Version: Linux flora 2.2.1 #1 SMP Mon Feb 8 02:25:57 CET 1999 i586 unknown

Versions of the packages dpkg depends on:
hi  libc6           2.0.7v-1       The GNU C library version 2 (run-time files)
ii  libstdc++2.8    2.90.29-2      The GNU stdc++ library (old egcs version)
hi  ncurses3.4      1.9.9g-8.10    Video terminal manipulation - shared librari


Reply to: