The following commit has been merged in the master branch:
commit 68d73d7248ad038522052a8f2718c225676d2e44
Author: Patrick Winnertz <win...@debian.org>
Date:   Tue Aug 11 15:04:16 2009 +0200

    Fix one missing include in lustre-snmp.c
    
    Signed-off-by: Patrick Winnertz <win...@debian.org>

diff --git a/debian/patches/00list b/debian/patches/00list
index 3952e0a..b23a48a 100644
--- a/debian/patches/00list
+++ b/debian/patches/00list
@@ -21,4 +21,4 @@ fix-lustre-manpage.dpatch
 enable-quota.dpatch
 fix-symlink-attack.dpatch
 use_bash_instead_of_sh.dpatch
-#bio_errors.dpatch
+lustre-snmp-missing-include.dpatch
diff --git a/debian/patches/lustre-snmp-missing-include.dpatch 
b/debian/patches/lustre-snmp-missing-include.dpatch
new file mode 100755
index 0000000..d7dd41b
--- /dev/null
+++ b/debian/patches/lustre-snmp-missing-include.dpatch
@@ -0,0 +1,141 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## autogen.dpatch by Patrick Winnertz <win...@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: missing include for lustre-snmp-trap.h 
+
+...@dpatch@
+diff -u -r lustre-1.8.1/snmp/lustre-snmp-trap.c 
lustre-1.8.1__2.6.26/snmp/lustre-snmp-trap.c
+--- lustre-1.8.1/snmp/lustre-snmp-trap.c       2008-08-07 11:37:43.000000000 
+0200
++++ lustre-1.8.1__2.6.26/snmp/lustre-snmp-trap.c       2009-08-11 
15:27:11.000000000 +0200
+@@ -59,6 +59,7 @@
+ #include <unistd.h>
+ #include <stdio.h>
+ #include <stdarg.h>
++#include <ctype.h>
+ #include "lustre-snmp-util.h"
+ 
+ /**************************************************************************
+@@ -364,7 +365,7 @@
+ 
+     /*And the data is a octet string, that contains the actually reason 
string*/
+     var_trap[1].type = ASN_OCTET_STR;
+-    var_trap[1].val.string = reason_string;
++    var_trap[1].val.string = (unsigned char *)reason_string;
+     var_trap[1].val_len = strlen(reason_string);
+ 
+     /*And now send off the trap*/
+@@ -419,7 +420,7 @@
+ 
+     /*And the data is a octet string, that contains the actually reason 
strong*/
+     var_trap[1].type = ASN_OCTET_STR;
+-    var_trap[1].val.string = obd_name;
++    var_trap[1].val.string = (unsigned char *)obd_name;
+     var_trap[1].val_len = strlen(obd_name);
+ 
+     /* 
+@@ -434,7 +435,7 @@
+ 
+     /*And the data is a octet string, that contains the actually reason 
strong*/
+     var_trap[2].type = ASN_OCTET_STR;
+-    var_trap[2].val.string = reason_string;
++    var_trap[2].val.string = (unsigned char *)reason_string;
+     var_trap[2].val_len = strlen(reason_string);
+ 
+     /*And now send off the trap*/
+diff -u -r lustre-1.8.1/snmp/lustre-snmp-util.c 
lustre-1.8.1__2.6.26/snmp/lustre-snmp-util.c
+--- lustre-1.8.1/snmp/lustre-snmp-util.c       2008-08-07 11:37:43.000000000 
+0200
++++ lustre-1.8.1__2.6.26/snmp/lustre-snmp-util.c       2009-08-11 
15:29:38.000000000 +0200
+@@ -45,6 +45,7 @@
+ #include <net-snmp/net-snmp-config.h>
+ #include <net-snmp/net-snmp-includes.h>
+ #include <net-snmp/agent/net-snmp-agent-includes.h>
++#include <net-snmp/util_funcs.h>
+ 
+ /*
+  *  include our .h file
+@@ -296,8 +297,8 @@
+ 
+ int get_sysstatus(void)
+ {
+-    FILE    *fptr = NULL;
+-    int     len = 0;
++    // FILE    *fptr = NULL;
++    // int     len = 0;
+     int     ret_val = ERROR ;
+     char    sys_status[50] = {0};
+     
+@@ -542,9 +543,9 @@
+         size_t  *var_len)
+ {
+     static unsigned char string[SPRINT_MAX_LEN];
+-    if( SUCCESS != read_string(file_path, string,sizeof(string)))
++    if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
+         return NULL;
+-    *var_len = strlen(string);
++    *var_len = strlen((char *)string);
+     return (unsigned char *) string;
+ }
+ 
+diff -u -r lustre-1.8.1/snmp/lustre-snmp.c 
lustre-1.8.1__2.6.26/snmp/lustre-snmp.c
+--- lustre-1.8.1/snmp/lustre-snmp.c    2008-08-07 11:37:43.000000000 +0200
++++ lustre-1.8.1__2.6.26/snmp/lustre-snmp.c    2009-08-11 15:22:13.000000000 
+0200
+@@ -39,9 +39,11 @@
+  */
+  
+ #include <net-snmp/net-snmp-config.h>
++#include <lustre-snmp-trap.h>
+ #include <net-snmp/net-snmp-includes.h>
+ #include <net-snmp/agent/net-snmp-agent-includes.h>
+ #include <net-snmp/utilities.h>
++#include <net-snmp/util_funcs.h>
+ #include <pthread.h>
+ #include "lustre-snmp.h"
+ 
+@@ -238,23 +240,23 @@
+ 
+     case SYSVERSION:
+         sprintf(file_path, "%s%s", LUSTRE_PATH,"version");
+-        if( SUCCESS != read_string(file_path, string,sizeof(string)))
++        if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
+             return NULL;
+-        *var_len = strlen(string);
++        *var_len = strlen((char *)string);
+         return (unsigned char *) string;
+ 
+     case SYSKERNELVERSION:
+         sprintf(file_path, "%s%s", LUSTRE_PATH,"kernel_version");
+-        if( SUCCESS != read_string(file_path, string,sizeof(string)))
++        if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
+             return NULL;
+-        *var_len = strlen(string);
++        *var_len = strlen((char *)string);
+         return (unsigned char *) string;
+ 
+     case SYSHEALTHCHECK:
+         sprintf(file_path, "%s%s", LUSTRE_PATH,FILENAME_SYSHEALTHCHECK);
+-        if( SUCCESS != read_string(file_path, string,sizeof(string)))
++        if( SUCCESS != read_string(file_path, (char *)string,sizeof(string)))
+             return NULL;
+-        *var_len = strlen(string);
++        *var_len = strlen((char *)string);
+         return (unsigned char *) string;
+ 
+     case SYSSTATUS:
+@@ -574,7 +576,7 @@
+ {
+   static long *long_ret;
+   int size;
+-  int pid, new_value;
++  int new_value;
+ 
+ 
+ 
+Only in lustre-1.8.1__2.6.26/snmp: struct.h
+diff --git a/snmp/struct.h b/snmp/struct.h
+new file mode 100644
+index 0000000..302ce24
+--- /dev/null
++++ b/snmp/struct.h
+@@ -0,0 +1 @@
++/*placeholder*/

-- 
Lustre Debian Packaging 

_______________________________________________
Pkg-lustre-svn-commit mailing list
Pkg-lustre-svn-commit@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/pkg-lustre-svn-commit

Reply via email to