lsof/lsof.patch

Mon, 28 Jan 2013 17:37:18 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Mon, 28 Jan 2013 17:37:18 +0100
changeset 758
a2c6460cfb16
parent 464
3e2a08d916c6
permissions
-rw-r--r--

Correct socket error reporting improvement with IPv6 portable code,
after helpful recommendation by Saúl Ibarra Corretgé on OSips devlist.

     1 Index: Configure
     2 --- Configure.orig	2012-04-10 18:35:48.000000000 +0200
     3 +++ Configure	2012-08-03 12:18:36.290850960 +0200
     4 @@ -440,7 +440,7 @@
     5        fi	# }
     6      fi	# }
     7      LSOF_TGT="aix"
     8 -    echo $LSOF_CC | grep gcc > /dev/null
     9 +    $LSOF_CC --version | grep GCC > /dev/null
    10      if test $? -eq 0	# {
    11      then
    13 @@ -594,7 +594,7 @@
    15  	    rm -f dialects/aix/aix5/j2/j2_snapshot.h
    16  	  fi	# }
    17 -	  echo $LSOF_CC | grep gcc > /dev/null
    18 +	  $LSOF_CC --version | grep GCC > /dev/null
    19  	  if test $? -eq 0	# {
    20  	  then
    22 @@ -632,7 +632,7 @@
    23        # This is AIX >= 5 on ia64.
    25  	LSOF_TSTK64=1
    26 -	echo $LSOF_CC | grep gcc > /dev/null
    27 +	$LSOF_CC --version | grep GCC > /dev/null
    28  	if test $? -eq 0	# {
    29  	then
    31 @@ -709,7 +709,7 @@
    32  	  fi	# }
    33  	  LSOF_TSTK64=1
    34  	  LSOF_TMP1=1
    35 -	  echo $LSOF_CC | grep gcc > /dev/null
    36 +	  $LSOF_CC --version | grep GCC > /dev/null
    37  	  if test $? -eq 0	# {
    38  	  then
    39  	    LSOF_CFGF="$LSOF_CFGF -maix64"
    40 @@ -756,7 +756,7 @@
    41      fi	#}
    42      LSOF_CFGF="$LSOF_CFGF -DAIXV=$LSOF_VERS"
    43      LSOF_DIALECT_DIR=aix
    44 -    echo $LSOF_CC | grep gcc > /dev/null
    45 +    $LSOF_CC --version | grep GCC > /dev/null
    46      if test $? -eq 0 	# {
    47      then
    49 @@ -2269,7 +2269,7 @@
    50  	fi	# }
    51        fi	# }
    52      fi	# }
    53 -    echo $LSOF_CC | grep gcc > /dev/null
    54 +    $LSOF_CC --version | grep GCC > /dev/null
    55      if test $? -eq 0	# {
    56      then
    57        LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
    58 @@ -2323,7 +2323,7 @@
    59        then
    60  	LSOF_CFGF="$LSOF_CFGF -Ae +DD32"
    61        else
    62 -	echo $LSOF_CC | grep -q gcc
    63 +	$LSOF_CC --version | grep -q GCC
    64  	if test $? -ne 0	# {
    65  	then
    66  	  LSOF_CFGF="$LSOF_CFGF +DD32"
    67 @@ -2407,7 +2407,7 @@
    68  	    echo "* NOTICE!  Configuring for 64 bit HP-UX *"
    69  	    echo "*                                       *"
    70  	    echo "*****************************************"
    71 -	    echo $LSOF_CC | grep gcc > /dev/null
    72 +	    $LSOF_CC --version | grep GCC > /dev/null
    73  	    if test $? -eq 0	# {
    74  	    then
    76 @@ -2476,7 +2476,7 @@
    77  	  else
    78  	    LSOF_CFGF="$LSOF_CFGF -D_FILE_OFFSET_BITS=64"
    79  	    LSOF_CINFO="${LSOF_CINFO}, 32 bit HP-UX"
    80 -	    echo $LSOF_CC | grep gcc > /dev/null
    81 +	    $LSOF_CC --version | grep GCC > /dev/null
    82  	    if test $? -ne 0	# {
    83  	    then
    84  	      LSOF_CFGF="$LSOF_CFGF +DAportable"
    85 @@ -3710,7 +3710,7 @@
    86  	LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
    87        fi	# }
    88      fi	# }
    89 -    echo $LSOF_CC | grep gcc > /dev/null
    90 +    $LSOF_CC --version | grep GCC > /dev/null
    91      if test $? -eq 0	# {
    92      then
    93        LSOF_CFGL="$LSOF_CFGL -w"
    94 @@ -4355,6 +4355,9 @@
    95  	LSOF_TSTBIGF=" "
    96  	LSOF_TSTLFLG="-lsocket -lnsl"
    97  	LSOF_VERS="100000"
    98 + 	if [ ".`isainfo -k`" = .amd64 ]; then
    99 + 	    LSOF_CFGL="$LSOF_CFGL -lmp -lmd5 -lscf -ldoor -luutil"
   100 + 	fi
   101  	;;
   102        5.11*)
   103  	LSOF_TSTBIGF=" "
   104 @@ -4446,7 +4449,7 @@
   105  	echo "main(){" >> ${LSOF_TMPC}.c
   106  	echo "enum prnodetype p=PR_GWINDOWS;}" >> ${LSOF_TMPC}.c
   107  	echo "Testing prdata.h for PR_GWINDOWS, using $LSOF_CC"
   108 -	echo $LSOF_CC | grep gcc > /dev/null
   109 +	$LSOF_CC --version | grep GCC > /dev/null
   110  	if test $? -eq 0	# {
   111  	then
   112  	  $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x  > /dev/null 2>&1
   113 @@ -4471,7 +4474,7 @@
   114  	echo "main(){" >> ${LSOF_TMPC}.c
   115  	echo "enum prnodetype p=PR_LDT;}" >> ${LSOF_TMPC}.c
   116  	echo "Testing prdata.h for PR_LDT, using $LSOF_CC"
   117 -	echo $LSOF_CC | grep gcc > /dev/null
   118 +	$LSOF_CC --version | grep GCC > /dev/null
   119  	if test $? -eq 0	# {
   120  	then
   121  	  $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1
   122 @@ -4505,7 +4508,7 @@
   123  	echo $SOLARIS_KERNBITS | grep 64 > /dev/null
   124  	if test $? -eq 0	# {
   125  	then
   126 -	  echo $LSOF_CC | grep gcc > /dev/null
   127 +	  $LSOF_CC --version | grep GCC > /dev/null
   128  	  if test $? -eq 0	# {
   129  	  then
   131 @@ -4836,7 +4839,7 @@
   132        echo "main(){" >> ${LSOF_TMPC}.c
   133        echo "enum vtype p=VSOCK;}" >> ${LSOF_TMPC}.c
   134        echo "Testing vnode.h for VSOCK, using $LSOF_CC"
   135 -      echo $LSOF_CC | grep gcc > /dev/null
   136 +      $LSOF_CC --version | grep GCC > /dev/null
   137        if test $? -eq 0	# {
   138        then
   139  	$LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1
   140 @@ -5525,7 +5528,7 @@
   141      echo "$i" >> $LSOF_TSTCFLG
   142    done	# }
   143  fi	# }
   144 -echo $LSOF_CC | grep gcc > /dev/null 2>&1
   145 +$LSOF_CC --version | grep GCC > /dev/null 2>&1
   146  if test $? -eq 0	# {
   147  then
   148    echo "-DLT_GCC" >> $LSOF_TSTCFLG
   149 Index: dialects/freebsd/machine.h
   150 --- dialects/freebsd/machine.h.orig	2010-07-29 18:04:31.000000000 +0200
   151 +++ dialects/freebsd/machine.h	2012-08-03 12:18:36.291289597 +0200
   152 @@ -441,6 +441,11 @@
   153   */
   155  /* #define	HASSECURITY	1 */
   156 +#if    FREEBSDV>=6000
   157 +#define        HASSECURITY     1
   158 +#define        HAS_SI_PRIV     1
   159 +#endif /* FREEBSDV>=6000 */
   160 +
   163  /*
   164 Index: dialects/sun/machine.h
   165 --- dialects/sun/machine.h.orig	2011-09-07 21:16:07.000000000 +0200
   166 +++ dialects/sun/machine.h	2012-08-03 12:18:36.291671855 +0200
   167 @@ -105,6 +105,7 @@
   168  #include <sys/poll.h>
   170  # if	solaris>=80000
   171 +#include <sys/types32.h>
   172  #include <sys/wait.h>
   173  #include <sys/types32.h>
   174  #define	_KERNEL	1

mercurial