pkgsrc-Bugs archive

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

pkg/38515: sysutils/lsof doesn't build on NetBSD>=4.99.56



>Number:         38515
>Category:       pkg
>Synopsis:       sysutils/lsof doesn't build on NetBSD>=4.99.56
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Apr 26 14:05:00 +0000 2008
>Originator:     Alan Barrett
>Release:        NetBSD 4.99.60
>Organization:
Not much
>Environment:
System: NetBSD 4.99.60 i386
>Description:
        The lsof packags, in pkgsrc/sysutils/lsof, doesn't build on
        NetBSD 4.99.56 or later.
>How-To-Repeat:
        cd pkgsrc/sysutils/lsof
        make
>Fix:
        The files dialects/n+obsd/dlsof.h and dialects/n+obsd/dnode.c
        apparently need to be changed to fit in with the new data
        structures introduced in NetBSD's sys/filedesc.h revision
        1.46.  The Configure script also needs to be changed to detect
        the new state.

        I append a few patches, which I think are necessary,
        but they are certainly not sufficient.  These should
        be applied in addition to the patches already in
        pkgsrc/sysutils/lsof/patches/*.

--- dialects/n+obsd/dlsof.h.orig        2006-03-28 23:54:15.000000000 +0200
+++ dialects/n+obsd/dlsof.h
@@ -38,6 +38,10 @@
 #if    !defined(NETBSD_LSOF_H)
 #define        NETBSD_LSOF_H   1
 
+#include <sys/types.h>
+#include <stdbool.h>
+#include <sys/param.h>
+
 #include <stdlib.h>
 #include <dirent.h>
 #include <nlist.h>
@@ -56,6 +60,7 @@
   
 # if   defined(HAS_LWP_H)
 #include <sys/lwp.h>
+#undef P_PID /* XXX definition in sys/pset.h conflicts with lsof usage */
 # endif        /* defined(HAS_LWP_H) */
 
 # if   (defined(OPENBSDV) && OPENBSDV>=3030) \
--- Configure.orig      2007-04-24 21:00:22.000000000 +0200
+++ Configure
@@ -3060,7 +3095,7 @@ return(0); }
     fi # }
     if test "X$LSOF_TMP3" != "X"       # {
     then
-      grep -q "^struct cwdinfo {" $LSOF_TMP3
+      egrep -q "^(typedef )*struct cwdinfo {" $LSOF_TMP3
       if test $? -eq 0 # {
       then
        LSOF_CFGF="$LSOF_CFGF -DHASCWDINFO"
@@ -3069,6 +3104,15 @@ return(0); }
          LSOF_TMP1=1
        fi      # }
       fi       # }
+      egrep -q "^(typedef )*struct fdfile {" $LSOF_TMP3
+      if test $? -eq 0 # {
+      then
+       LSOF_CFGF="$LSOF_CFGF -DHASFDFILE"
+       if test $LSOF_TMP1 -eq 0 -a $LSOF_TMP4 -eq 1    # {
+       then
+         LSOF_TMP1=1
+       fi      # }
+      fi       # }
     fi # }
     LSOF_TMP2="sys/pipe.h"
     if test -r ${LSOF_INCLUDE}/$LSOF_TMP2      # {
--- 00PORTING.orig      2007-04-24 18:14:07.000000000 +0200
+++ 00PORTING
@@ -783,6 +783,9 @@ possibilities
                        <miscfs/fdesc.h> has a Fctty definition; 2,
                        it does not.
 
+    HASFDFILE          indicates the fdfile structure is defined
+                       in the NetBSD <sys/filedesc.h>.
+
     HASFDLINK          indicates the file descriptor file system
                        node has the fd_link member.
 



Home | Main Index | Thread Index | Old Index